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>
Tue, 23 Aug 2022 16:06:16 +0000 (12:06 -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>
src/plugins/ctf/lttng-live/lttng-live.cpp

index 457b48353f83299fed25ec09cabd55b01ee29928..cfc962cac7d1aef14a75f158f532cbc5ebce3353 100644 (file)
@@ -2007,21 +2007,13 @@ end:
     }
 }
 
-static void lttng_live_component_destroy_data(struct lttng_live_component *lttng_live)
-{
-    delete lttng_live;
-}
-
 BT_HIDDEN
 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
@@ -2107,7 +2099,7 @@ lttng_live_component_create(const bt_value *params, bt_self_component *self_comp
     goto end;
 
 error:
-    lttng_live_component_destroy_data(lttng_live);
+    delete lttng_live;
     lttng_live = NULL;
 end:
     g_free(validation_error);
@@ -2148,7 +2140,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.028893 seconds and 5 git commands to generate.