lib/trace-ir/clock-snapshot.c: assert that the parameter is not `NULL`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 8 Jul 2019 19:51:33 +0000 (15:51 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 8 Jul 2019 20:47:56 +0000 (16:47 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I8943dd2d89cf23f6ef5f0c35d06dfe41bbfd8635
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1649

src/lib/trace-ir/clock-snapshot.c

index 307198d2a27c8813098f0feefc204707955469c5..19e6781673efbeff125c3ff33082118656eb920d 100644 (file)
@@ -39,6 +39,7 @@
 BT_HIDDEN
 void bt_clock_snapshot_destroy(struct bt_clock_snapshot *clock_snapshot)
 {
+       BT_ASSERT(clock_snapshot);
        BT_LIB_LOGD("Destroying clock snapshot: %!+k", clock_snapshot);
        BT_OBJECT_PUT_REF_AND_RESET(clock_snapshot->clock_class);
        g_free(clock_snapshot);
This page took 0.024165 seconds and 4 git commands to generate.