diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2018-02-20 19:40:49 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2018-02-20 21:38:55 +0100 |
commit | 8f1bc6d821167d87e21034d108e899e0b5cd14f2 (patch) | |
tree | 2f7303adab51b5819c15be3e9255c52a4216e221 /dev-libs | |
parent | net-misc/youtube-viewer: version bump to 3.3.3. (diff) | |
download | gentoo-8f1bc6d821167d87e21034d108e899e0b5cd14f2.tar.gz gentoo-8f1bc6d821167d87e21034d108e899e0b5cd14f2.tar.bz2 gentoo-8f1bc6d821167d87e21034d108e899e0b5cd14f2.zip |
dev-libs/librdkafka: Rev bump to address memory leak
Package-Manager: Portage-2.3.24, Repoman-2.3.6
RepoMan-Options: --force
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/librdkafka/files/librdkafka-0.11.3-fix-memory-leak-issue1534.patch | 19 | ||||
-rw-r--r-- | dev-libs/librdkafka/librdkafka-0.11.3-r1.ebuild (renamed from dev-libs/librdkafka/librdkafka-0.11.3.ebuild) | 2 |
2 files changed, 21 insertions, 0 deletions
diff --git a/dev-libs/librdkafka/files/librdkafka-0.11.3-fix-memory-leak-issue1534.patch b/dev-libs/librdkafka/files/librdkafka-0.11.3-fix-memory-leak-issue1534.patch new file mode 100644 index 000000000000..ae4c3e5bc81e --- /dev/null +++ b/dev-libs/librdkafka/files/librdkafka-0.11.3-fix-memory-leak-issue1534.patch @@ -0,0 +1,19 @@ +https://github.com/edenhill/librdkafka/commit/8fed971043e642c195860cd77006622d23616c22 + +--- a/src/rdkafka_msgset_writer.c ++++ b/src/rdkafka_msgset_writer.c +@@ -436,10 +436,12 @@ rd_kafka_msgset_writer_write_msg_payload (rd_kafka_msgset_writer_t *msetw, + * room in the buffer we'll copy the payload to the buffer, + * otherwise we push a reference to the memory. */ + if (rkm->rkm_len <= (size_t)rk->rk_conf.msg_copy_max_size && +- rd_buf_write_remains(&rkbuf->rkbuf_buf) > rkm->rkm_len) ++ rd_buf_write_remains(&rkbuf->rkbuf_buf) > rkm->rkm_len) { + rd_kafka_buf_write(rkbuf, + rkm->rkm_payload, rkm->rkm_len); +- else ++ if (free_cb) ++ free_cb(rkm->rkm_payload); ++ } else + rd_kafka_buf_push(rkbuf, rkm->rkm_payload, rkm->rkm_len, + free_cb); + } diff --git a/dev-libs/librdkafka/librdkafka-0.11.3.ebuild b/dev-libs/librdkafka/librdkafka-0.11.3-r1.ebuild index 00872b0eadc7..f7ec851be536 100644 --- a/dev-libs/librdkafka/librdkafka-0.11.3.ebuild +++ b/dev-libs/librdkafka/librdkafka-0.11.3-r1.ebuild @@ -15,6 +15,8 @@ if [[ ${PV} == "9999" ]]; then else SRC_URI="https://github.com/edenhill/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc x86" + + PATCHES=( "${FILESDIR}"/${P}-fix-memory-leak-issue1534.patch ) fi LICENSE="BSD-2" |