summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-08-30 00:39:57 +0200
committerDan McGee <dan@archlinux.org>2007-09-07 02:45:16 +0200
commitb15a5194d1a8485a2769560e49e6ff03e1862533 (patch)
tree0b97fac43b59b1fb787b6e7c1c159ccdd334518c /lib/libalpm
parent53fc745aedc0a6d24abbc8bce6ca0b30c2179e5f (diff)
downloadpacman-b15a5194d1a8485a2769560e49e6ff03e1862533.tar.gz
pacman-b15a5194d1a8485a2769560e49e6ff03e1862533.tar.xz
libalpm/trans.c : remove the lock even on interrupted transactions.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/trans.c5
1 files changed, 3 insertions, 2 deletions
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);
}
/** @} */