Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix memory leak in contrail-collector when kafka down
When kafka down, contrail-collecor can receive event. To detect if
kafka start again, contrail-collector need call librdkafka api to
detect metadata, the metada is a pointer, librdkafka will malloc
memory for metadata, and need caller to free it.

Change-Id: I0f43c9aec204f983333e10fb4c0122f37becb4af
Closes-bug: 1770123
  • Loading branch information
ZhiqiangCui committed May 29, 2018
1 parent 39075c7 commit a90c233
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/analytics/kafka_processor.cc
Expand Up @@ -418,6 +418,8 @@ KafkaProcessor::KafkaTimer() {
k_event_cb.disableKafka = false;
}
}
LOG(DEBUG, "Deleting metadata !!!");
delete metadata;
}
}

Expand Down

0 comments on commit a90c233

Please sign in to comment.