summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 090e054)
raw | patch | inline | side by side (parent: 090e054)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 6 Dec 2015 11:21:45 +0000 (12:21 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 6 Dec 2015 11:21:45 +0000 (12:21 +0100) |
CID #38124
src/write_kafka.c | patch | blob | history |
diff --git a/src/write_kafka.c b/src/write_kafka.c
index a5977aba786770e1e29489b9590a26ed21561c0c..736fddb12a993f8aeaebea16a8a7e513351bda6a 100644 (file)
--- a/src/write_kafka.c
+++ b/src/write_kafka.c
}
if ((val = strdup(child->values[1].value.string)) == NULL) {
WARNING("cannot allocate memory for attribute value.");
+ sfree(key);
goto errout;
}
ret = rd_kafka_conf_set(conf, key, val, errbuf, sizeof(errbuf));
if (ret != RD_KAFKA_CONF_OK) {
WARNING("cannot set kafka property %s to %s: %s",
key, val, errbuf);
+ sfree(key);
+ sfree(val);
goto errout;
}
sfree(key);