Merge pull request #37538 from yuvalif/potential_crash_in_kafka

fix potential crash in rgw_kafka
This commit is contained in:
Yuval Lifshitz 2020-10-13 08:04:18 +03:00 committed by GitHub
commit 2b034f2eb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ struct connection_t {
std::vector<rd_kafka_topic_t*> topics;
bool marked_for_deletion = false;
uint64_t delivery_tag = 1;
int status;
int status = STATUS_OK;
mutable std::atomic<int> ref_count = 0;
CephContext* const cct;
CallbackList callbacks;
@ -371,6 +371,7 @@ private:
}
conn->destroy(err);
delete tag;
return;
}
if (tag) {