X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbind.c;h=dd49cb2220709ed8dc5b760928d21d013cdcb871;hb=f0b5610723ae8962ae264f84210f8bac483bcd20;hp=32b0f16e21f50311d530f934f72964076dfee0ee;hpb=8c864f5e634118fce2446ebbba96a1cb7ec39dda;p=collectd.git diff --git a/src/bind.c b/src/bind.c index 32b0f16e..dd49cb22 100644 --- a/src/bind.c +++ b/src/bind.c @@ -1666,7 +1666,7 @@ static int bind_config_add_view (oconfig_item_t *ci) /* {{{ */ if (tmp->name == NULL) { ERROR ("bind plugin: strdup failed."); - free (tmp); + sfree (views); return (-1); } @@ -1709,6 +1709,7 @@ static int bind_config (oconfig_item_t *ci) /* {{{ */ return (-1); } + sfree (url); url = strdup (child->values[0].value.string); } else if (strcasecmp ("OpCodes", child->key) == 0) bind_config_set_bool ("OpCodes", &global_opcodes, child); @@ -1759,7 +1760,7 @@ static int bind_init (void) /* {{{ */ curl_easy_setopt (curl, CURLOPT_MAXREDIRS, 50L); #ifdef HAVE_CURLOPT_TIMEOUT_MS curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, (timeout >= 0) ? - (long) timeout : CDTIME_T_TO_MS(plugin_get_interval())); + (long) timeout : (long) CDTIME_T_TO_MS(plugin_get_interval())); #endif