curl_xml plugin: Clear type_instance if it is not set.
authorFlorian Forster <octo@huhu.verplant.org>
Mon, 11 Jan 2010 14:44:14 +0000 (15:44 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Mon, 11 Jan 2010 14:44:14 +0000 (15:44 +0100)
src/curl_xml.c

index 589d96f..d7b80b2 100644 (file)
@@ -416,6 +416,8 @@ static int  cx_submit_xpath_values (char *plugin_instance, /* {{{ */
          if (instance_node != NULL)
            sstrncpy (vl.type_instance, (char *) xmlNodeGetContent(instance_node->nodeTab[0]),
                      sizeof (vl.type_instance));
+         else
+           vl.type_instance[0] = 0;
        }
 
        /* free up object */