Fix: field-class.c: dereference before `NULL` check
[babeltrace.git] / src / lib / trace-ir / field-class.c
index 97409dc98222e21d68a673395a7b1d7d71dc8d5e..610f8f7515b26f187af04d613b2cab49251842e0 100644 (file)
@@ -799,9 +799,8 @@ void destroy_named_field_class(gpointer ptr)
 {
        struct bt_named_field_class *named_fc = ptr;
 
-       BT_OBJECT_PUT_REF_AND_RESET(named_fc->user_attributes);
-
        if (ptr) {
+               BT_OBJECT_PUT_REF_AND_RESET(named_fc->user_attributes);
                finalize_named_field_class(ptr);
                g_free(ptr);
        }
This page took 0.022801 seconds and 4 git commands to generate.