index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2007-10-29 01:00:52 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-10-29 01:00:52 -0500 |
commit | cc754bc6e3be0f37ca0eaca4b6b90f033433fb1a (patch) | |
tree | a9940053625e4b4e9b5d345eb1ac441a911f6efa /lib/libalpm/handle.c | |
parent | fe3a461703a5d90937c0c6f1ce0c3d802c0f8630 (diff) |
-rw-r--r-- | lib/libalpm/handle.c | 7 |
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 242bbe51..5cbb0157 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -47,13 +47,8 @@ pmhandle_t *_alpm_handle_new() { pmhandle_t *handle; - handle = malloc(sizeof(pmhandle_t)); - if(handle == NULL) { - _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes\n"), sizeof(pmhandle_t)); - RET_ERR(PM_ERR_MEMORY, NULL); - } + CALLOC(handle, 1, sizeof(pmhandle_t), RET_ERR(PM_ERR_MEMORY, NULL)); - memset(handle, 0, sizeof(pmhandle_t)); handle->lckfd = -1; handle->logstream = NULL; |