From b15a5194d1a8485a2769560e49e6ff03e1862533 Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Thu, 30 Aug 2007 00:39:57 +0200 Subject: libalpm/trans.c : remove the lock even on interrupted transactions. Signed-off-by: Chantry Xavier --- lib/libalpm/trans.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index c0e38c78..fe37a1f9 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -171,6 +171,7 @@ int SYMEXPORT alpm_trans_commit(alpm_list_t **data) int SYMEXPORT alpm_trans_release() { pmtrans_t *trans; + int ret = 0; ALPM_LOG_FUNC; @@ -187,7 +188,7 @@ int SYMEXPORT alpm_trans_release() trans->state = STATE_INTERRUPTED; } pm_errno = PM_ERR_TRANS_COMMITING; - return(-1); + ret = -1; } _alpm_trans_free(trans); @@ -205,7 +206,7 @@ int SYMEXPORT alpm_trans_release() alpm_option_get_lockfile()); } - return(0); + return(ret); } /** @} */ -- cgit v1.2.3-24-g4f1b