Fix: check string payload for NULL before calling g_string_free()
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 6 Mar 2015 22:41:56 +0000 (17:41 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 16 Mar 2015 19:01:45 +0000 (15:01 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ir/event-fields.c

index aefb3af2626bf391449dfb4a0b1f5c50c70edde7..a93cf695c6c5a86c50c41889cd254177b4563640 100644 (file)
@@ -1288,7 +1288,9 @@ void bt_ctf_field_string_destroy(struct bt_ctf_field *field)
        }
 
        string = container_of(field, struct bt_ctf_field_string, parent);
-       g_string_free(string->payload, TRUE);
+       if (string->payload) {
+               g_string_free(string->payload, TRUE);
+       }
        g_free(string);
 }
 
This page took 0.025475 seconds and 4 git commands to generate.