summaryrefslogtreecommitdiffstats
path: root/src/pacman/query.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/query.c')
-rw-r--r--src/pacman/query.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 5ca52c38..d1105b4a 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -77,6 +77,10 @@ static int search_path(char **filename, struct stat *bufptr)
}
fullname = malloc(plen + flen + 2);
+ if(!fullname) {
+ free(envpath);
+ return(-1);
+ }
sprintf(fullname, "%s/%s", path, *filename);
if(lstat(fullname, bufptr) == 0) {