Because the CLI is not consuming the current thread's error yet, clear
it every time to avoid a memory leak.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ifb36292a20a5592e660ce16201ee13e017d01780
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1614
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
end:
BT_OBJECT_PUT_REF_AND_RESET(cfg);
fini_static_data();
+
+ /*
+ * Clear current thread's error in case there is one to avoid a
+ * memory leak.
+ */
+ bt_current_thread_clear_error();
return retcode;
}