26 Aug
2011
26 Aug
'11
11:10 a.m.
Jump to the cleanup label, free "pkgpath" and restore umask if a non-local database is passed. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- lib/libalpm/be_local.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c index f53bd64..4844ade 100644 --- a/lib/libalpm/be_local.c +++ b/lib/libalpm/be_local.c @@ -760,7 +760,8 @@ int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, alpm_dbinfrq_t inforeq oldmask = umask(0022); if(strcmp(db->treename, "local") != 0) { - return -1; + retval = -1; + goto cleanup; } /* DESC */ -- 1.7.6.1