Free string vector correctly.

This commit is contained in:
Michael Drake 2013-10-24 12:55:48 +01:00
parent 26cecc9f95
commit 0c44eb081e

View File

@ -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);
}