diff --git a/src/curl_xml.c b/src/curl_xml.c
index 3ffb71c559c77d3f00d5f8027880646be0f7c2be..c33ec1f3ad091096ad4d3913078b80c0591f22cc 100644 (file)
--- a/src/curl_xml.c
+++ b/src/curl_xml.c
static int cx_config_append_string (const char *name, struct curl_slist **dest, /* {{{ */
oconfig_item_t *ci)
{
+ struct curl_slist *temp = NULL;
if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_STRING))
{
WARNING ("curl_xml plugin: `%s' needs exactly one string argument.", name);
return (-1);
}
- *dest = curl_slist_append(*dest, ci->values[0].value.string);
- if (*dest == NULL)
+ temp = curl_slist_append(*dest, ci->values[0].value.string);
+ if (temp == NULL)
return (-1);
+ *dest = temp;
+
return (0);
} /* }}} int cx_config_append_string */