if ((analysisData->graphsData->hullPoints[i][j]= fopen(name, "w")) ==
NULL)
{
- g_error(strerror(errno));
+ g_error("%s", strerror(errno));
}
}
}
retval= chdir(cwd);
if (retval == -1)
{
- g_error(strerror(errno));
+ g_error("%s", strerror(errno));
}
free(cwd);
}
retval= fclose(analysisData->graphsData->hullPoints[i][j]);
if (retval != 0)
{
- g_error(strerror(errno));
+ g_error("%s", strerror(errno));
}
}
}
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
if ((fp= fopen(fileName, "w")) == NULL)
{
- g_error(strerror(errno));
+ g_error("%s", strerror(errno));
}
fprintf(fp, "#%-24s %-25s %-25s %-25s\n", "x", "middle", "min", "max");
retval= chdir(cwd);
if (retval == -1)
{
- g_error(strerror(errno));
+ g_error("%s", strerror(errno));
}
free(cwd);