From bf81b18f6b902230f043a736649b75a785728184 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 22 Jun 2022 16:07:03 -0400 Subject: [PATCH] src.ctf.lttng-live: remove lttng_live_component_destroy_data Change-Id: I9e57187adcaba990c1f48885cc6e8e94f96c0ac3 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/8450 Reviewed-by: Philippe Proulx Reviewed-on: https://review.lttng.org/c/babeltrace/+/12364 Tested-by: jenkins --- src/plugins/ctf/lttng-live/lttng-live.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/plugins/ctf/lttng-live/lttng-live.cpp b/src/plugins/ctf/lttng-live/lttng-live.cpp index a6dfd210..0c446862 100644 --- a/src/plugins/ctf/lttng-live/lttng-live.cpp +++ b/src/plugins/ctf/lttng-live/lttng-live.cpp @@ -1968,20 +1968,12 @@ end: } } -static void lttng_live_component_destroy_data(struct lttng_live_component *lttng_live) -{ - delete lttng_live; -} - void lttng_live_component_finalize(bt_self_component_source *component) { lttng_live_component *data = (lttng_live_component *) bt_self_component_get_data( bt_self_component_source_as_self_component(component)); - if (!data) { - return; - } - lttng_live_component_destroy_data(data); + delete data; } static enum session_not_found_action @@ -2064,7 +2056,7 @@ lttng_live_component_create(const bt_value *params, bt_self_component_source *se goto end; error: - lttng_live_component_destroy_data(lttng_live); + delete lttng_live; lttng_live = NULL; end: g_free(validation_error); @@ -2099,7 +2091,7 @@ lttng_live_component_init(bt_self_component_source *self_comp_src, goto end; error: - lttng_live_component_destroy_data(lttng_live); + delete lttng_live; lttng_live = NULL; end: return ret; -- 2.34.1