cli: clear current thread's error, if any, before exiting
[babeltrace.git] / src / cli / babeltrace2.c
index e5d4370ccf6365c0c1e8452324dae77c5eebd5d0..78d7b9b62f553db42933f40e2cb48e3e2b0ce271 100644 (file)
@@ -2866,5 +2866,11 @@ int main(int argc, const char **argv)
 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;
 }
This page took 0.02439 seconds and 4 git commands to generate.