From 6af7dbcf72b0e95f7c36b17fac88fd2658c2a8e4 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 29 Oct 2007 23:11:49 -0500 Subject: pacman/query.c: add missing free() Signed-off-by: Dan McGee --- src/pacman/query.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pacman/query.c b/src/pacman/query.c index 8a01d829..42e163ef 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -47,18 +47,17 @@ static char *resolve_path(const char* file) str = calloc(PATH_MAX+1, sizeof(char)); if(!str) { - /* null hmmm.... */ return(NULL); } if(!realpath(file, str)) { + free(str); return(NULL); } return(str); } - static int query_fileowner(alpm_list_t *targets) { int ret = 0; -- cgit v1.2.3-70-g09d2