Free "syncpath" and restore umask if we fail to grab a lock. Signed-off-by: Lukas Fleischer <archli...@cryptocrack.de> --- lib/libalpm/be_sync.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index 6e64e5f..5e53798 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -176,6 +176,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); } -- 1.7.6.1