libxbps: fix a memleak introduced in 1403826fa.

This commit is contained in:
Juan RP 2015-02-17 16:39:04 +01:00
parent 1403826fa6
commit 628a344560

View File

@ -123,6 +123,7 @@ symlink_target(struct xbps_handle *xhp, const char *path)
assert(p);
if (strstr(p, "./") && ((p1 = realpath(p, NULL)))) {
res = strdup(p1 + strlen(xhp->rootdir));
free(p1);
}
if (res == NULL) {
res = strdup(p + strlen(xhp->rootdir)+1);