src.ctf.lttng-live: remove lttng_live_component_destroy_data
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 22 Jun 2022 20:07:03 +0000 (16:07 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 17 Apr 2024 17:57:53 +0000 (13:57 -0400)
Change-Id: I9e57187adcaba990c1f48885cc6e8e94f96c0ac3
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8450
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12364
Tested-by: jenkins <jenkins@lttng.org>
src/plugins/ctf/lttng-live/lttng-live.cpp

index a6dfd2104cbb103585a43d163838ea025767a9b8..0c446862c14f4560f79b1f6c99145dd746537c4c 100644 (file)
@@ -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;
This page took 0.025006 seconds and 4 git commands to generate.