xbps_symlink_target: fix a double free.
This commit is contained in:
parent
430a25f422
commit
f5f25a5ff4
@ -499,8 +499,6 @@ 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);
|
||||||
}
|
}
|
||||||
assert(res);
|
|
||||||
free(p);
|
|
||||||
}
|
}
|
||||||
if (res == NULL) {
|
if (res == NULL) {
|
||||||
if (strcmp(xhp->rootdir, "/") == 0) {
|
if (strcmp(xhp->rootdir, "/") == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user