mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-04 08:35:07 -05:00
_alpm_runscriptlet: free memory on error
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
88eedef6c6
commit
9cf1b2c004
@ -343,7 +343,7 @@ int _alpm_runscriptlet(alpm_handle_t *handle, const char *filepath,
|
|||||||
|
|
||||||
/* either extract or copy the scriptlet */
|
/* either extract or copy the scriptlet */
|
||||||
len += strlen("/.INSTALL");
|
len += strlen("/.INSTALL");
|
||||||
MALLOC(scriptfn, len, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
|
MALLOC(scriptfn, len, free(tmpdir); RET_ERR(handle, ALPM_ERR_MEMORY, -1));
|
||||||
snprintf(scriptfn, len, "%s/.INSTALL", tmpdir);
|
snprintf(scriptfn, len, "%s/.INSTALL", tmpdir);
|
||||||
if(is_archive) {
|
if(is_archive) {
|
||||||
if(_alpm_unpack_single(handle, filepath, tmpdir, ".INSTALL")) {
|
if(_alpm_unpack_single(handle, filepath, tmpdir, ".INSTALL")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user