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.11.0~8 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=48a0b866530f4c7cd60f5f6e6b3fa60e1b97445f;p=lttng-tools.git 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 d297cf0a3..a53cf24e2 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; }