libpkgconf: path: fix memory leak when deduping paths (closes #39)
parent
03e5d0fd31
commit
7e0b0fadab
|
@ -95,8 +95,13 @@ pkgconf_path_add(const char *text, pkgconf_list_t *dirlist, bool filter)
|
|||
char *linkdest = realpath(path, NULL);
|
||||
|
||||
if (linkdest != NULL && stat(linkdest, &st) == -1)
|
||||
{
|
||||
free(linkdest);
|
||||
return;
|
||||
}
|
||||
|
||||
free(linkdest);
|
||||
}
|
||||
if (path_list_contains_entry(path, dirlist, &st))
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue