From 49cca668b488572e43aebf83abb30ad5a31ac834 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Fri, 26 Oct 2012 13:12:47 -0400 Subject: [PATCH] Add liblttng-ctl destructor to cleanup memory Signed-off-by: David Goulet --- src/lib/lttng-ctl/lttng-ctl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index cc69dd5c2..bab62458b 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -1680,3 +1680,11 @@ static void __attribute__((constructor)) init() /* Set socket for health check */ (void) set_health_socket_path(); } + +/* + * lib destructor + */ +static void __attribute__((destructor)) lttng_ctl_exit() +{ + free(tracing_group); +} -- 2.34.1