From f828aeda606803f3ab8abe50c6077efe78fdb527 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 24 Jul 2017 17:00:08 -0400 Subject: [PATCH] Fix: Explicit null dereferenced MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Found by Coverity: CID 1376244 (#3 of 3): Explicit null dereferenced (FORWARD_NULL) 10. var_deref_op: Dereferencing null pointer node. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- plugins/ctf/common/metadata/visitor-generate-ir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/ctf/common/metadata/visitor-generate-ir.c b/plugins/ctf/common/metadata/visitor-generate-ir.c index 8cf147ec..f8f9538b 100644 --- a/plugins/ctf/common/metadata/visitor-generate-ir.c +++ b/plugins/ctf/common/metadata/visitor-generate-ir.c @@ -1650,7 +1650,7 @@ int visit_typealias(struct ctx *ctx, struct ctf_node *target, /* Do not allow typedef and typealias of untagged variants */ if (bt_ctf_field_type_is_variant(type_decl)) { if (bt_ctf_field_type_variant_get_tag_name(type_decl)) { - _BT_LOGE_NODE(node, + _BT_LOGE_NODE(target, "Type definition of untagged variant field type is not allowed."); ret = -EPERM; goto end; @@ -1662,7 +1662,7 @@ int visit_typealias(struct ctx *ctx, struct ctf_node *target, * abstract or not (if it has an identifier). Check it here. */ if (qdummy_field_name != 0) { - _BT_LOGE_NODE(node, + _BT_LOGE_NODE(target, "Expecting empty identifier: id=\"%s\"", g_quark_to_string(qdummy_field_name)); ret = -EINVAL; -- 2.34.1