X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Flttv%2Fsync%2Fevent_analysis_chull.c;h=d36022c94ec9e29484ff4c0a9b4b7ce27f1b96f7;hb=df64b31664467d7217fa08fcdee423577856b38a;hp=154258e00effc5af9369dc13c1c036e2d999125a;hpb=ab6edc6a1a55aefe52cfd9e610b5f21ee2029544;p=lttv.git diff --git a/lttv/lttv/sync/event_analysis_chull.c b/lttv/lttv/sync/event_analysis_chull.c index 154258e0..d36022c9 100644 --- a/lttv/lttv/sync/event_analysis_chull.c +++ b/lttv/lttv/sync/event_analysis_chull.c @@ -240,7 +240,7 @@ static void openGraphFiles(SyncState* const syncState) if ((analysisData->graphsData->hullPoints[i][j]= fopen(name, "w")) == NULL) { - g_error(strerror(errno)); + g_error("%s", strerror(errno)); } } } @@ -249,7 +249,7 @@ static void openGraphFiles(SyncState* const syncState) retval= chdir(cwd); if (retval == -1) { - g_error(strerror(errno)); + g_error("%s", strerror(errno)); } free(cwd); } @@ -329,7 +329,7 @@ static void closeGraphFiles(SyncState* const syncState) retval= fclose(analysisData->graphsData->hullPoints[i][j]); if (retval != 0) { - g_error(strerror(errno)); + g_error("%s", strerror(errno)); } } } @@ -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