Skip to content

Commit ba97e1a

Browse files
committed
rgw/amqp: fix valgrind errors on uninitialized memory
Fixes: https://tracker.ceph.com/issues/64690 Signed-off-by: Yuval Lifshitz <[email protected]>
1 parent b8f127c commit ba97e1a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/rgw/rgw_amqp.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,10 @@ bool new_state(connection_t* conn, const connection_id_t& conn_id) {
513513

514514
/// struct used for holding messages in the message queue
515515
struct message_wrapper_t {
516-
connection_id_t conn_id;
517-
std::string topic;
518-
std::string message;
519-
reply_callback_t cb;
516+
const connection_id_t conn_id;
517+
const std::string topic;
518+
const std::string message;
519+
const reply_callback_t cb;
520520

521521
message_wrapper_t(const connection_id_t& _conn_id,
522522
const std::string& _topic,

src/rgw/rgw_amqp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ void shutdown();
2626
// key class for the connection list
2727
struct connection_id_t {
2828
std::string host;
29-
int port;
29+
int port = 0;
3030
std::string vhost;
3131
std::string exchange;
32-
bool ssl;
32+
bool ssl = false;
3333
connection_id_t() = default;
3434
connection_id_t(const amqp_connection_info& info, const std::string& _exchange);
3535
};

0 commit comments

Comments
 (0)