29 Aug
2011
29 Aug
'11
1:48 a.m.
On Fri, Aug 26, 2011 at 6:10 AM, Lukas Fleischer <archlinux@cryptocrack.de> wrote:
Free "syncpath" and restore umask if we fail to grab a lock.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Thanks. --- 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