index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-07-25 10:05:36 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-07-25 10:07:48 -0500 |
commit | 88644e181db49f3f94e6891166823fd5f46acbcc (patch) | |
tree | 06fc9a0a97cc51db4bd90a831b94a85af15a938d /src/pacman/sync.c | |
parent | 005eab0a080925d0d6f780d751f9019dafbafc64 (diff) |
-rw-r--r-- | src/pacman/sync.c | 11 |
diff --git a/src/pacman/sync.c b/src/pacman/sync.c index c56934b6..6962306a 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -644,7 +644,15 @@ static int process_group(alpm_list_t *dbs, char *group) group); select_display(pkgs); char *array = malloc(count); - multiselect_question(array, count); + if(!array) { + ret = 1; + goto cleanup; + } + if(multiselect_question(array, count)) { + ret = 1; + free(array); + goto cleanup; + } int n = 0; for(i = pkgs; i; i = alpm_list_next(i)) { if(array[n++] == 0) @@ -657,6 +665,7 @@ static int process_group(alpm_list_t *dbs, char *group) goto cleanup; } } + free(array); } else { for(i = pkgs; i; i = alpm_list_next(i)) { pmpkg_t *pkg = alpm_list_getdata(i); |