From: Yuval Lifshitz Date: Sun, 4 Oct 2020 15:05:34 +0000 (+0300) Subject: rgw/kafka: fix potential crash when accessing tags X-Git-Tag: v16.1.0~864^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0ba5fba94205eb2c42455dba2f8579bdaab3322b;p=ceph.git rgw/kafka: fix potential crash when accessing tags issues were detected by pvs-studio static analyzer Signed-off-by: Yuval Lifshitz --- diff --git a/src/rgw/rgw_kafka.cc b/src/rgw/rgw_kafka.cc index dfaefdfb2707..1e8af36ba879 100644 --- a/src/rgw/rgw_kafka.cc +++ b/src/rgw/rgw_kafka.cc @@ -64,7 +64,7 @@ struct connection_t { std::vector topics; bool marked_for_deletion = false; uint64_t delivery_tag = 1; - int status; + int status = STATUS_OK; mutable std::atomic ref_count = 0; CephContext* const cct; CallbackList callbacks; @@ -371,6 +371,7 @@ private: } conn->destroy(err); delete tag; + return; } if (tag) {