From: Barbara Kaczorowska Date: Fri, 28 Aug 2020 10:20:26 +0000 (+0000) Subject: Fix memory leak in curl plugin X-Git-Tag: collectd-5.12.0~6^2~3^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b43d99883d0e5e687e2e0eaaf1a84259a03cf823;p=thirdparty%2Fcollectd.git Fix memory leak in curl plugin This commit will add the patch that fixes the memory leak in curl plugin. Before when AddressFamily field was set in config file in variable af was pointer to value of this field and it wasn't freed at the end. Now this bug is fixed. --- diff --git a/src/curl.c b/src/curl.c index 7eb480584..3e9368545 100644 --- a/src/curl.c +++ b/src/curl.c @@ -467,6 +467,7 @@ static int cc_config_add_page(oconfig_item_t *ci) /* {{{ */ child->key, page->instance); status = -1; } + free(af); } else if (strcasecmp("User", child->key) == 0) status = cf_util_get_string(child, &page->user); else if (strcasecmp("Password", child->key) == 0)