Fix: release the reference held by a child to its former parent
[babeltrace.git] / include / babeltrace / object-internal.h
index 4bf4def69c070f3182003d5e57feae19d2ad6f2d..5c3ca6d992caa1a029d7cf274057c4a5fcb5e345 100644 (file)
@@ -96,6 +96,7 @@ void bt_object_set_parent(void *child_ptr, void *parent)
         * to the parent will be released once the object's reference count
         * falls to zero.
         */
+       BT_PUT(child->parent);
        child->parent = bt_get(parent);
 }
 
This page took 0.036891 seconds and 4 git commands to generate.