From: Jérémie Galarneau Date: Fri, 11 Oct 2019 21:12:26 +0000 (-0400) Subject: sessiond: clean-up: enhance logging on event allocation failure X-Git-Tag: v2.12.0-rc1~309 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=205339471d9653a2b011d3eafe3a711cf79a6aca;hp=e9f11505edfba881935d966c0ce09a39571a1887 sessiond: clean-up: enhance logging on event allocation failure Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index b3251c19c..47cda2451 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -1100,7 +1100,7 @@ struct ust_app_event *alloc_ust_app_event(char *name, /* Init most of the default value by allocating and zeroing */ ua_event = zmalloc(sizeof(struct ust_app_event)); if (ua_event == NULL) { - PERROR("malloc"); + PERROR("Failed to allocate ust_app_event structure"); goto error; } @@ -3133,7 +3133,7 @@ int create_ust_app_event(struct ust_app_session *ua_sess, ua_event = alloc_ust_app_event(uevent->attr.name, &uevent->attr); if (ua_event == NULL) { - /* Only malloc can failed so something is really wrong */ + /* Only failure mode of alloc_ust_app_event(). */ ret = -ENOMEM; goto end; }