Fix: missing return value check in notification serialization
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 29 Aug 2018 22:47:44 +0000 (18:47 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Aug 2018 16:49:44 +0000 (12:49 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/notification.c

index 674429692aafd25199bf9008287b7d37cc50784d..e32737dce89ce94d5c4e7c58e06ef16fee92a063 100644 (file)
@@ -56,6 +56,9 @@ int lttng_notification_serialize(const struct lttng_notification *notification,
        header_offset = buf->size;
        ret = lttng_dynamic_buffer_append(buf, &notification_comm,
                        sizeof(notification_comm));
+       if (ret) {
+               goto end;
+       }
 
        size_before_payload = buf->size;
        ret = lttng_condition_serialize(notification->condition,
This page took 0.025921 seconds and 4 git commands to generate.