summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-10-24 12:55:48 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-10-24 12:55:48 +0100
commit0c44eb081e584353596b36f85357459e07881ae6 (patch)
tree09fed5008a012b3a9b5476df1cd9e964702f1c64
parent26cecc9f95e55f33b4cb95e9439c718b9caf29d8 (diff)
downloadnetsurf-0c44eb081e584353596b36f85357459e07881ae6.tar.gz
netsurf-0c44eb081e584353596b36f85357459e07881ae6.tar.bz2
Free string vector correctly.
-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);
}