X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fnotification.c;h=674429692aafd25199bf9008287b7d37cc50784d;hp=3826534cda89e3833e75cba2311020388744adb3;hb=9b63a4aa352c184984395c097f86d5e54c295012;hpb=577983cb5ac581ff691d650bd6c5c68719feb31f diff --git a/src/common/notification.c b/src/common/notification.c index 3826534cd..674429692 100644 --- a/src/common/notification.c +++ b/src/common/notification.c @@ -40,13 +40,12 @@ struct lttng_notification *lttng_notification_create( notification->condition = condition; notification->evaluation = evaluation; - notification->owns_elements = false; end: return notification; } LTTNG_HIDDEN -int lttng_notification_serialize(struct lttng_notification *notification, +int lttng_notification_serialize(const struct lttng_notification *notification, struct lttng_dynamic_buffer *buf) { int ret; @@ -134,7 +133,6 @@ ssize_t lttng_notification_create_from_buffer( goto error; } ret = notification_size; - (*notification)->owns_elements = true; end: return ret; error: @@ -149,10 +147,8 @@ void lttng_notification_destroy(struct lttng_notification *notification) return; } - if (notification->owns_elements) { - lttng_condition_destroy(notification->condition); - lttng_evaluation_destroy(notification->evaluation); - } + lttng_condition_destroy(notification->condition); + lttng_evaluation_destroy(notification->evaluation); free(notification); }