summaryrefslogtreecommitdiff
path: root/utils/filepath.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/filepath.c')
-rw-r--r--utils/filepath.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/filepath.c b/utils/filepath.c
index f0aa19585..7f11def10 100644
--- a/utils/filepath.c
+++ b/utils/filepath.c
@@ -310,6 +310,10 @@ filepath_path_to_strvec(const char *path)
/* exported interface documented in filepath.h */
void filepath_free_strvec(char **pathv)
{
- free(pathv[0]);
+ int p = 0;
+
+ while (pathv[p] != NULL) {
+ free(pathv[p++]);
+ }
free(pathv);
}