X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/10a64d33f744b0b04592fce080053a8ae3ee3a49..00de8de3e9c61db157855abdc793c403ab24ab0e:/src/vikgobjectbuilder.c?ds=sidebyside diff --git a/src/vikgobjectbuilder.c b/src/vikgobjectbuilder.c index 9867d931..f8648374 100644 --- a/src/vikgobjectbuilder.c +++ b/src/vikgobjectbuilder.c @@ -5,7 +5,7 @@ * * viking is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or + * Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * viking is distributed in the hope that it will be useful, but @@ -34,7 +34,6 @@ #include "vikgobjectbuilder.h" /* FIXME use private fields */ -static gchar *class_name = NULL; GType gtype = 0; gchar *property_name = NULL; GParameter *parameters = NULL; @@ -104,13 +103,14 @@ _start_element (GMarkupParseContext *context, { if (strcmp(element_name, "object") == 0) { - class_name = g_strdup(attribute_values[0]); + gchar *class_name = g_strdup(attribute_values[0]); gtype = g_type_from_name (class_name); if (gtype == 0) { g_warning("Unknown GObject type '%s'", class_name); return; } + g_free (class_name); } if (strcmp(element_name, "property") == 0 && gtype != 0) {