diff options
Diffstat (limited to 'src/pacman')
-rw-r--r-- | src/pacman/pacman.c | 5 | ||||
-rw-r--r-- | src/pacman/query.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 1a6e3eb4..008a8066 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -732,8 +732,9 @@ static void cl_to_log(int argc, char* argv[]) size += strlen(argv[i]) + 1; } char *cl_text = malloc(size); - if(!cl_text) + if(!cl_text) { return; + } char *p = cl_text; for(i = 0; i<argc-1; i++) { strcpy(p, argv[i]); @@ -884,7 +885,7 @@ int main(int argc, char *argv[]) } /* set up the print operations */ - if(config->print) { + if(config->print && !config->op_s_clean) { config->noconfirm = 1; config->flags |= PM_TRANS_FLAG_NOCONFLICTS; config->flags |= PM_TRANS_FLAG_NOLOCK; 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) { |