Fix: CC prio. map. leak in event notification
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 3 Aug 2017 20:34:10 +0000 (16:34 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 11 Aug 2017 22:54:16 +0000 (18:54 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/graph/notification/event.c

index b56f556fbfde51e2b7046f735cf5ece68c5cda4c..d205e66df95d323a1a10407638104ccd3e9064cf 100644 (file)
@@ -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);
                bt_ctf_event_class_get_name(event_class),
                bt_ctf_event_class_get_id(event_class), cc_prio_map,
                notification);
-       return &notification->parent;
+       goto end;
 
 error:
 
 error:
-       bt_put(notification);
+       BT_PUT(notification);
+
+end:
        bt_put(cc_prio_map);
        bt_put(cc_prio_map);
-       return NULL;
+       return &notification->parent;
 }
 
 struct bt_ctf_event *bt_notification_event_get_event(
 }
 
 struct bt_ctf_event *bt_notification_event_get_event(
This page took 0.024519 seconds and 4 git commands to generate.