From 737cacd27067f6dd35d1c781449374b4f91aaf76 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Tue, 6 Aug 2019 12:47:26 -0400 Subject: [PATCH] src.ctf.lttng-live: `live_viewer_connection`: make `obj` first member 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 Change-Id: I15ccf573e0b7f5078d434852e915f90d685e65e1 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1832 Tested-by: jenkins --- src/plugins/ctf/lttng-live/viewer-connection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/ctf/lttng-live/viewer-connection.h b/src/plugins/ctf/lttng-live/viewer-connection.h index 94073426..28404736 100644 --- a/src/plugins/ctf/lttng-live/viewer-connection.h +++ b/src/plugins/ctf/lttng-live/viewer-connection.h @@ -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; -- 2.34.1