summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/handle.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-05-20 00:42:22 +0200
committerDan McGee <dan@archlinux.org>2011-05-20 00:42:22 +0200
commit65c18807350b2bedff0546b839fd5cd0004a6d4f (patch)
tree9b6046a782e77ca8fdcc44159266c5e3ce6fafec /lib/libalpm/handle.c
parentf2c4e7e55220addef0581d1c38cc7363b5a0884c (diff)
downloadpacman-65c18807350b2bedff0546b839fd5cd0004a6d4f.tar.gz
pacman-65c18807350b2bedff0546b839fd5cd0004a6d4f.tar.xz
Bail early if we don't have a valid lockfile path
This addresses FS#24292. If one does the bad thing of not checking pm_errno after calling set_dbpath(), you may not realize the initialization process went wrong and calling trans_init() resulted in a segfault. If we don't have a lockfile path, bail out and have trans_init() fail. Also remove a ALPM_LOG_FUNC call that was causing pm_errno to return "no handle"; this was due to a log call in the handle setup (whereby the log attempts to use a callback attached to the handle). Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/handle.c')
-rw-r--r--lib/libalpm/handle.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index d8ce9fd2..586aad1e 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -46,8 +46,6 @@ pmhandle_t *_alpm_handle_new()
{
pmhandle_t *handle;
- ALPM_LOG_FUNC;
-
CALLOC(handle, 1, sizeof(pmhandle_t), RET_ERR(PM_ERR_MEMORY, NULL));
return(handle);