diff --git a/src/curl_xml.c b/src/curl_xml.c
index 689d5e1599c84bede8976dde892537f0e4d57a42..efaf290e7af80f77b7cf89687f67ca061e947c2c 100644 (file)
--- a/src/curl_xml.c
+++ b/src/curl_xml.c
sstrncpy (xpath->values[i].path, ci->values[i].value.string, sizeof (xpath->values[i].path));
}
- return (0);
+ return (0);
} /* }}} cx_config_add_values */
static int cx_config_add_xpath (cx_t *db, /* {{{ */
{
ERROR ("curl_xml plugin: invalid xpath. "
"xpath value can't be an empty string");
+ sfree (xpath);
return (-1);
}
if (db->list == NULL)
{
ERROR ("curl_xml plugin: list creation failed.");
+ sfree (xpath->path);
+ sfree (xpath);
return (-1);
}
}
if (name == NULL)
{
ERROR ("curl_xml plugin: strdup failed.");
+ sfree (xpath->path);
+ sfree (xpath);
return (-1);
}
if (le == NULL)
{
ERROR ("curl_xml plugin: llentry_create failed.");
+ sfree (xpath->path);
+ sfree (xpath);
return (-1);
}
{
ERROR ("curl_xml plugin: cx_config: "
"Invalid key: %s", ci->key);
+ cx_free (db);
return (-1);
}