From d4629a98ce942eb7bb40b2de558e532e61f450b1 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Thu, 3 Aug 2017 16:34:10 -0400 Subject: [PATCH] Fix: CC prio. map. leak in event notification MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- lib/graph/notification/event.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/graph/notification/event.c b/lib/graph/notification/event.c index b56f556f..d205e66d 100644 --- a/lib/graph/notification/event.c +++ b/lib/graph/notification/event.c @@ -251,12 +251,14 @@ struct bt_notification *bt_notification_event_create(struct bt_ctf_event *event, bt_ctf_event_class_get_name(event_class), bt_ctf_event_class_get_id(event_class), cc_prio_map, notification); - return ¬ification->parent; + goto end; error: - bt_put(notification); + BT_PUT(notification); + +end: bt_put(cc_prio_map); - return NULL; + return ¬ification->parent; } struct bt_ctf_event *bt_notification_event_get_event( -- 2.34.1