From 628a34456036fa8c7f68768328f70fa6a383b986 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 17 Feb 2015 16:39:04 +0100 Subject: [PATCH] libxbps: fix a memleak introduced in 1403826fa. --- lib/package_remove.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/package_remove.c b/lib/package_remove.c index 04d6e008..623a8052 100644 --- a/lib/package_remove.c +++ b/lib/package_remove.c @@ -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);