xbps_symlink_target: fix a double free.

This commit is contained in:
Juan RP 2016-02-02 11:51:26 +01:00
parent 430a25f422
commit f5f25a5ff4

View File

@ -499,8 +499,6 @@ xbps_symlink_target(struct xbps_handle *xhp, const char *path, const char *tgt)
res = strdup(p1 + strlen(xhp->rootdir));
free(p1);
}
assert(res);
free(p);
}
if (res == NULL) {
if (strcmp(xhp->rootdir, "/") == 0) {