From 41d7b64744c4ed33634ad106e5becd1d816f33a2 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 31 Jul 2014 10:19:28 +0200 Subject: [PATCH] uwrap: Log error if we are out of memory. Signed-off-by: Andreas Schneider Reviewed-by: Michael Adam --- lib/uid_wrapper/uid_wrapper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/uid_wrapper/uid_wrapper.c b/lib/uid_wrapper/uid_wrapper.c index eec6d967423..0bc961ebdf7 100644 --- a/lib/uid_wrapper/uid_wrapper.c +++ b/lib/uid_wrapper/uid_wrapper.c @@ -490,12 +490,14 @@ static int uwrap_new_id(pthread_t tid, bool do_alloc) if (do_alloc) { id = malloc(sizeof(struct uwrap_thread)); if (id == NULL) { + UWRAP_LOG(UWRAP_LOG_ERROR, "Unable to allocate memory"); errno = ENOMEM; return -1; } id->groups = malloc(sizeof(gid_t) * 1); if (id->groups == NULL) { + UWRAP_LOG(UWRAP_LOG_ERROR, "Unable to allocate memory"); SAFE_FREE(id); errno = ENOMEM; return -1; -- 2.11.4.GIT