From: ciomaire Date: Wed, 15 Apr 2015 13:19:27 +0000 (-0700) Subject: fix double free errors found by valgrind X-Git-Tag: collectd-5.5.0~32^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=2177f827c757854087f179e63016bb0980d4655e;p=collectd.git fix double free errors found by valgrind --- diff --git a/src/write_kafka.c b/src/write_kafka.c index c5c7e3df..b6e89618 100644 --- a/src/write_kafka.c +++ b/src/write_kafka.c @@ -111,6 +111,8 @@ static int kafka_handle(struct kafka_topic_context *ctx) /* {{{ */ } rd_kafka_conf_destroy(ctx->kafka_conf); + ctx->kafka_conf = NULL; + INFO ("write_kafka plugin: created KAFKA handle : %s", rd_kafka_name(ctx->kafka)); #ifdef HAVE_LIBRDKAFKA_LOGGER @@ -132,6 +134,8 @@ static int kafka_handle(struct kafka_topic_context *ctx) /* {{{ */ } rd_kafka_topic_conf_destroy(ctx->conf); + ctx->conf = NULL; + INFO ("write_kafka plugin: handle created for topic : %s", rd_kafka_topic_name(ctx->topic)); }