mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 07:48:50 -05:00
parse_descfile: fix memory leak in error case
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
2108d95526
commit
fc5be14dac
@ -237,7 +237,7 @@ static int parse_descfile(alpm_handle_t *handle, struct archive *a, alpm_pkg_t *
|
||||
} else if(strcmp(key, "backup") == 0) {
|
||||
alpm_backup_t *backup;
|
||||
CALLOC(backup, 1, sizeof(alpm_backup_t), return -1);
|
||||
STRDUP(backup->name, ptr, return -1);
|
||||
STRDUP(backup->name, ptr, FREE(backup); return -1);
|
||||
newpkg->backup = alpm_list_add(newpkg->backup, backup);
|
||||
} else if(strcmp(key, "force") == 0) {
|
||||
/* deprecated, skip it */
|
||||
|
Loading…
Reference in New Issue
Block a user