summaryrefslogtreecommitdiff
path: root/src/pacman
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-05-19 17:17:32 -0500
committerDan McGee <dan@archlinux.org>2011-05-19 17:17:32 -0500
commit11fb9c767450dc193bbeef755c228aa620df75d9 (patch)
tree9f47a77d27b39ee7ddef40edba7bed3016d3ba08 /src/pacman
parent70cf4546d6d35ef9ef2751f37853cde679c88aa7 (diff)
parentf2c4e7e55220addef0581d1c38cc7363b5a0884c (diff)
Merge branch 'maint'
Conflicts: lib/libalpm/trans.c src/pacman/query.c
Diffstat (limited to 'src/pacman')
-rw-r--r--src/pacman/pacman.c5
-rw-r--r--src/pacman/query.c4
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) {