Fix two memory leaks
[lttv.git] / lttv / lttv / sync / event_analysis_chull.c
index 154258e00effc5af9369dc13c1c036e2d999125a..21f288939c2fe1f9408cfb4d466dc22562e187fd 100644 (file)
@@ -384,13 +384,15 @@ static void destroyAnalysisCHull(SyncState* const syncState)
 
                        for (j= 0; j < i; j++)
                        {
-                               // There seems to be a memory leak in glpk, valgrind reports a
-                               // loss (reachable) even if the problem is deleted
                                glp_delete_prob(analysisData->lps[i][j]);
                        }
                        free(analysisData->lps[i]);
                }
                free(analysisData->lps);
+
+               /* Be careful, this invalidates all problem objects which still exist.
+                * Don't keep copies of lps past this point. */
+               glp_free_env();
        }
 #endif
 
This page took 0.022438 seconds and 4 git commands to generate.