lib/util: fix a memleak detected by clang-analyzer.
This commit is contained in:
parent
f5f25a5ff4
commit
1e733f4daa
@ -499,8 +499,8 @@ xbps_symlink_target(struct xbps_handle *xhp, const char *path, const char *tgt)
|
|||||||
res = strdup(p1 + strlen(xhp->rootdir));
|
res = strdup(p1 + strlen(xhp->rootdir));
|
||||||
free(p1);
|
free(p1);
|
||||||
}
|
}
|
||||||
}
|
free(p);
|
||||||
if (res == NULL) {
|
} else {
|
||||||
if (strcmp(xhp->rootdir, "/") == 0) {
|
if (strcmp(xhp->rootdir, "/") == 0) {
|
||||||
res = p;
|
res = p;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user