mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
be_sync.c: Fix memory leak in alpm_db_update()
Free "syncpath" and restore umask if we fail to grab a lock. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
a2002b8f69
commit
455ca55f4e
@ -177,6 +177,8 @@ int SYMEXPORT alpm_db_update(int force, alpm_db_t *db)
|
||||
|
||||
/* attempt to grab a lock */
|
||||
if(_alpm_handle_lock(handle)) {
|
||||
free(syncpath);
|
||||
umask(oldmask);
|
||||
RET_ERR(handle, ALPM_ERR_HANDLE_LOCK, -1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user