From 0b4ab2c0a80e8581e2caa50e809af7f5573c0e48 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Wed, 1 Mar 2006 07:51:00 +0000 Subject: added ERROR logs in case of malloc failures (patch from VMiklos ) --- lib/libalpm/trans.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/libalpm/trans.c') 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); } -- cgit v1.2.3