sessiond: clean-up: enhance logging on event allocation failure
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 11 Oct 2019 21:12:26 +0000 (17:12 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 11 Oct 2019 21:12:26 +0000 (17:12 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-app.c

index b3251c19c94ff6feb173fb387866becc799e6c03..47cda24517da22ad53a899892562f660e71e8e32 100644 (file)
@@ -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) {
        /* 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;
        }
 
                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) {
 
        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;
        }
                ret = -ENOMEM;
                goto end;
        }
This page took 0.028223 seconds and 5 git commands to generate.