mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
extract_single_file: fix memory leak in error condition
The memory assigned to checkfile was leaked in the error condition. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
5d618438c4
commit
5d11605958
@ -317,7 +317,7 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive,
|
|||||||
if(!backup->name || strcmp(backup->name, entryname_orig) != 0) {
|
if(!backup->name || strcmp(backup->name, entryname_orig) != 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
STRDUP(newhash, hash_pkg, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
|
STRDUP(newhash, hash_pkg, errors++; handle->pm_errno = ALPM_ERR_MEMORY; goto needbackup_cleanup);
|
||||||
FREE(backup->hash);
|
FREE(backup->hash);
|
||||||
backup->hash = newhash;
|
backup->hash = newhash;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user