Skip to content

Commit fd13955

Browse files
committed
Fix memory leak: ConfImpl within Conf
1 parent 85e60d8 commit fd13955

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/config.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ void Conf::stop() {
145145
}
146146
}
147147

148-
Conf::~Conf() {}
148+
Conf::~Conf() {
149+
// Delete the rdconf object, since that's what we are internally.
150+
RdKafka::Conf *rdconf = static_cast<RdKafka::Conf*>(this);
151+
delete rdconf;
152+
}
149153

150154
NodeKafka::Callbacks::Rebalance* Conf::rebalance_cb() const {
151155
RdKafka::RebalanceCb *cb = NULL;

0 commit comments

Comments
 (0)