src.ctf.lttng-live: `live_viewer_connection`: make `obj` first member
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 6 Aug 2019 16:47:26 +0000 (12:47 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 6 Aug 2019 21:39:18 +0000 (17:39 -0400)
This fixes a leak. The `bt_object` member must always be the first
because the internal API casts any `void *` parameter to `bt_object *`.
The object API was not getting the correct reference count here.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I15ccf573e0b7f5078d434852e915f90d685e65e1
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1832
Tested-by: jenkins <jenkins@lttng.org>
src/plugins/ctf/lttng-live/viewer-connection.h

index 94073426fa91feaed946145389f279a2a4cb132f..2840473608ad3327c4621a149646ce93b292edad 100644 (file)
@@ -45,9 +45,9 @@
 struct lttng_live_component;
 
 struct live_viewer_connection {
+       bt_object obj;
        bt_logging_level log_level;
        bt_self_component *self_comp;
-       bt_object obj;
 
        GString *url;
 
This page took 0.042035 seconds and 4 git commands to generate.