diff options
Diffstat (limited to 'mstat_plot.c')
-rw-r--r-- | mstat_plot.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mstat_plot.c b/mstat_plot.c index e846c61..b71ef69 100644 --- a/mstat_plot.c +++ b/mstat_plot.c @@ -49,9 +49,11 @@ static int find_program(const char *name) { while ((token = strsep(&path, ":")) != NULL) { snprintf(pathtest, PATH_MAX - 1, "%s/%s", token, name); if (access(pathtest, F_OK | X_OK) == 0) { + free(path); return 0; } } + free(path); return 1; } |