diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2006-03-01 08:51:00 +0100 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2006-03-01 08:51:00 +0100 |
commit | 0b4ab2c0a80e8581e2caa50e809af7f5573c0e48 (patch) | |
tree | 27a907f06e52ecb8ea1c5931350993bd38c89a06 /lib/libalpm/trans.c | |
parent | ce4c043805865f745e6aa8762455a2f9b19b25cd (diff) | |
download | pacman-0b4ab2c0a80e8581e2caa50e809af7f5573c0e48.tar.gz pacman-0b4ab2c0a80e8581e2caa50e809af7f5573c0e48.tar.xz |
added ERROR logs in case of malloc failures (patch from VMiklos <vmiklos@frugalware.org>)
Diffstat (limited to 'lib/libalpm/trans.c')
-rw-r--r-- | lib/libalpm/trans.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index b71d2fae..b515894b 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -27,6 +27,7 @@ #include "error.h" #include "package.h" #include "util.h" +#include "log.h" #include "list.h" #include "handle.h" #include "add.h" @@ -41,6 +42,7 @@ pmtrans_t *_alpm_trans_new() pmtrans_t *trans; if((trans = (pmtrans_t *)malloc(sizeof(pmtrans_t))) == NULL) { + _alpm_log(PM_LOG_ERROR, "malloc failure: could not allocate %d bytes", sizeof(pmtrans_t)); return(NULL); } |