Adapt ecp_group_free() to static constants
diff --git a/library/ecp.c b/library/ecp.c
index 8e162e7..8c5c06e 100644
--- a/library/ecp.c
+++ b/library/ecp.c
@@ -277,18 +277,17 @@
 {
     size_t i;
 
-    /* FIXME WIP */
-    if( grp->id != 0 )
-        return;
-
     if( grp == NULL )
         return;
 
-    mpi_free( &grp->P );
-    mpi_free( &grp->A );
-    mpi_free( &grp->B );
-    ecp_point_free( &grp->G );
-    mpi_free( &grp->N );
+    if( grp->h != 1 )
+    {
+        mpi_free( &grp->P );
+        mpi_free( &grp->A );
+        mpi_free( &grp->B );
+        ecp_point_free( &grp->G );
+        mpi_free( &grp->N );
+    }
 
     if( grp->T != NULL )
     {