From: Philippe Proulx Date: Thu, 3 Aug 2017 20:34:10 +0000 (-0400) Subject: Fix: CC prio. map. leak in event notification X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=d4629a98ce942eb7bb40b2de558e532e61f450b1 Fix: CC prio. map. leak in event notification Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- 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(