[pacman-dev] [PATCH 1/2] fix memory leak in _alpm_sync_commit
Signed-off-by: Jonathan Conder <j@skurvy.no-ip.org> --- lib/libalpm/sync.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 6b625ed..d9f4c28 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -955,7 +955,8 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data) } EVENT(trans, PM_TRANS_EVT_INTEGRITY_DONE, NULL, NULL); if(trans->flags & PM_TRANS_FLAG_DOWNLOADONLY) { - return(0); + ret = 0; + goto error; } trans->state = STATE_COMMITING; -- 1.7.1
On Sun, May 16, 2010 at 12:34 AM, Jonathan Conder <j@skurvy.no-ip.org> wrote:
Signed-off-by: Jonathan Conder <j@skurvy.no-ip.org> --- lib/libalpm/sync.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 6b625ed..d9f4c28 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -955,7 +955,8 @@ int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data) } EVENT(trans, PM_TRANS_EVT_INTEGRITY_DONE, NULL, NULL); if(trans->flags & PM_TRANS_FLAG_DOWNLOADONLY) { - return(0); + ret = 0; + goto error; }
trans->state = STATE_COMMITING; -- 1.7.1
Thanks. Applied.
participants (2)
-
Dan McGee
-
Jonathan Conder