]> saetta.ns0.it Git - zakform/libzakform/commitdiff
Struct Node not initialized.
authorAndrea Zagli <azagli@libero.it>
Fri, 13 Mar 2020 14:33:16 +0000 (15:33 +0100)
committerAndrea Zagli <azagli@libero.it>
Fri, 13 Mar 2020 14:33:16 +0000 (15:33 +0100)
src/formvalidatorcomposite.c

index 6b95e6aed8bb62e6403b3f5e0a644cf0325e7056..b17a23951c64d4f0636896e7a23015f92c954b01 100644 (file)
@@ -251,14 +251,14 @@ _zak_form_validator_composite_xml_parsing (ZakFormValidator *validator, xmlNode
                                        ZakFormElement *element;
                                        Node *n;
 
+                                       n = (Node *)g_new0 (Node, 1);
+
                                        if (g_strcmp0 ((gchar *)xmlGetProp (cur, (xmlChar *)"element"), "form") == 0)
                                                {
                                                        ZakFormValidatorConstructorFunc validator_constructor;
 
                                                        n->element_validator = NULL;
 
-                                                       n = (Node *)g_new0 (Node, 1);
-
                                                        validator_constructor = zak_form_get_form_validator ((gchar *)xmlGetProp (cur, (xmlChar *)"type"));
                                                        if (validator_constructor == NULL)
                                                                {