X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Flttng-live%2Flttng-live.cpp;h=d3f2c22d1e6f368707f41d64f03453e0bb9eb2cf;hb=6838d8aa4659141864f1479ff1641769ce1b0da5;hp=0c446862c14f4560f79b1f6c99145dd746537c4c;hpb=bf81b18f6b902230f043a736649b75a785728184;p=babeltrace.git diff --git a/src/plugins/ctf/lttng-live/lttng-live.cpp b/src/plugins/ctf/lttng-live/lttng-live.cpp index 0c446862..d3f2c22d 100644 --- a/src/plugins/ctf/lttng-live/lttng-live.cpp +++ b/src/plugins/ctf/lttng-live/lttng-live.cpp @@ -13,6 +13,7 @@ #include "common/assert.h" #include "cpp-common/bt2c/fmt.hpp" +#include "cpp-common/bt2c/glib-up.hpp" #include "cpp-common/vendor/fmt/format.h" #include "plugins/common/muxing/muxing.h" @@ -2028,6 +2029,7 @@ lttng_live_component_create(const bt_value *params, bt_self_component_source *se status = BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_MEMORY_ERROR; goto error; } else if (validation_status == BT_PARAM_VALIDATION_STATUS_VALIDATION_ERROR) { + bt2c::GCharUP errorFreer {validation_error}; BT_CPPLOGE_APPEND_CAUSE_SPEC(logger, "{}", validation_error); status = BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_ERROR; goto error; @@ -2059,8 +2061,6 @@ error: delete lttng_live; lttng_live = NULL; end: - g_free(validation_error); - *component = lttng_live; return status; }