summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-02-28 10:46:00 -0600
committerDan McGee <dan@archlinux.org>2011-02-28 10:46:00 -0600
commitf45369800abdeb54847d9ea6a326eb613f30cd3b (patch)
tree41ed4f7ae8c9fa18ed60a5b5ca1ccf6d4540bc62 /lib/libalpm/alpm.c
parent5ea4706f57e15de23a5fd36eff3bc4619aeac224 (diff)
downloadpacman-f45369800abdeb54847d9ea6a326eb613f30cd3b.tar.xz
Check local DB version before continuing transaction
Ensure we have a local DB version that is up to par with what we expect before we go down any road that might modify it. This should prevent stupid mistakes with the 3.5.X upgrade and people not running pacman-db-upgrade after the transaction as they will need to. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r--lib/libalpm/alpm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 7c3bfc26..4f95832d 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -56,6 +56,8 @@ int SYMEXPORT alpm_initialize(void)
}
if(_alpm_db_register_local() == NULL) {
/* error code should be set */
+ _alpm_handle_free(handle);
+ handle = NULL;
return(-1);
}