summaryrefslogtreecommitdiff
path: root/plugins/dexbnf
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dexbnf')
-rw-r--r--plugins/dexbnf/type.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/dexbnf/type.c b/plugins/dexbnf/type.c
index db838c1..b1e4155 100644
--- a/plugins/dexbnf/type.c
+++ b/plugins/dexbnf/type.c
@@ -66,6 +66,7 @@ static GDataType *dtd_full_class_name(input_buffer *buffer)
size_t saved; /* Point de sauvegarde */
char next; /* Prochain caractère obtenu */
GDataType *ns; /* Espace de nom à attribuer */
+ bool status; /* Bilan de rattachement */
/**
* Les règles traitées sont les suivantes :
@@ -116,7 +117,15 @@ static GDataType *dtd_full_class_name(input_buffer *buffer)
result = g_class_enum_type_new(CEK_CLASS, name);
- g_data_type_set_namespace(result, ns, strdup("."));
+ status = g_data_type_set_namespace(result, ns, ".");
+
+ g_object_unref(G_OBJECT(ns));
+
+ if (!status)
+ {
+ g_clear_object(&result);
+ break;
+ }
}
while (1);