From 34462b62999998e1b5bb7bc92724ebdb9283b3bd Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Mon, 15 May 2017 21:01:02 -0400 Subject: [PATCH] lib/ctf-ir/field-types.c: logging: log struct/var FT field destruction MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- lib/ctf-ir/field-types.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/ctf-ir/field-types.c b/lib/ctf-ir/field-types.c index 4b2f37cf..1cd231f2 100644 --- a/lib/ctf-ir/field-types.c +++ b/lib/ctf-ir/field-types.c @@ -306,6 +306,13 @@ void destroy_enumeration_mapping(struct enumeration_mapping *mapping) static void destroy_structure_field(struct structure_field *field) { + if (!field) { + return; + } + + BT_LOGD("Destroying structure/variant field type's field object: " + "addr=%p, field-ft-addr=%p, field-name=\"%s\"", + field, field->type, g_quark_to_string(field->name)); bt_put(field->type); g_free(field); } -- 2.34.1