blob: f41de43b97c514b18d5ec6533cefd004b60db1d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
darwin9 does not malloc on NULL resolved_path
https://github.com/pkgconf/pkgconf/pull/208
--- a/libpkgconf/path.c
+++ b/libpkgconf/path.c
@@ -92,15 +92,11 @@
return;
if (S_ISLNK(st.st_mode))
{
- char *linkdest = realpath(path, NULL);
+ char pathbuf[PATH_MAX];
+ char *linkdest = realpath(path, pathbuf);
if (linkdest != NULL && stat(linkdest, &st) == -1)
- {
- free(linkdest);
return;
- }
-
- free(linkdest);
}
if (path_list_contains_entry(path, dirlist, &st))
return;
|