summaryrefslogtreecommitdiff
path: root/girepository/girnode.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2013-11-06 11:37:50 +0000
committerPhilip Withnall <philip.withnall@collabora.co.uk>2013-11-06 11:38:08 +0000
commit6838e9313ad70781ac1316a05babbbf724ecfccc (patch)
treecf1966c9e1ce696e5088721268f059df7390429c /girepository/girnode.c
parent6b44b271fb27dc46175b58fbd7e1f36ac0419943 (diff)
downloadgobject-introspection-6838e9313ad70781ac1316a05babbbf724ecfccc.tar.gz
girnode: Fix a NULL pointer deference if a namespace can’t be found
https://bugzilla.gnome.org/show_bug.cgi?id=711541
Diffstat (limited to 'girepository/girnode.c')
-rw-r--r--girepository/girnode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/girepository/girnode.c b/girepository/girnode.c
index afb71e57..43614742 100644
--- a/girepository/girnode.c
+++ b/girepository/girnode.c
@@ -1151,6 +1151,10 @@ _g_ir_find_node (GIrTypelibBuild *build,
target_name = names[1];
}
+ /* find_namespace() may return NULL. */
+ if (target_module == NULL)
+ goto done;
+
for (l = target_module->entries; l; l = l->next)
{
GIrNode *node = (GIrNode *)l->data;
@@ -1162,6 +1166,7 @@ _g_ir_find_node (GIrTypelibBuild *build,
}
}
+done:
g_strfreev (names);
return return_node;