mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-16 15:49:24 +03:00
Free string vector correctly.
This commit is contained in:
parent
26cecc9f95
commit
0c44eb081e
@ -310,6 +310,10 @@ filepath_path_to_strvec(const char *path)
|
|||||||
/* exported interface documented in filepath.h */
|
/* exported interface documented in filepath.h */
|
||||||
void filepath_free_strvec(char **pathv)
|
void filepath_free_strvec(char **pathv)
|
||||||
{
|
{
|
||||||
free(pathv[0]);
|
int p = 0;
|
||||||
|
|
||||||
|
while (pathv[p] != NULL) {
|
||||||
|
free(pathv[p++]);
|
||||||
|
}
|
||||||
free(pathv);
|
free(pathv);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user