Fix: miscellaneous memory handling fixes
[lttng-tools.git] / src / bin / lttng-sessiond / ust-consumer.c
index b0a52b33ad49ca196d62326330e70750b7028190..9715c426f468f5b24cf76bf64726b0cf218d5af3 100644 (file)
@@ -250,6 +250,7 @@ int ust_consumer_get_channel(struct consumer_socket *socket,
        assert(ua_chan);
        assert(socket);
 
+       memset(&msg, 0, sizeof(msg));
        msg.cmd_type = LTTNG_CONSUMER_GET_CHANNEL;
        msg.u.get_channel.key = ua_chan->key;
 
@@ -344,6 +345,7 @@ int ust_consumer_destroy_channel(struct consumer_socket *socket,
        assert(ua_chan);
        assert(socket);
 
+       memset(&msg, 0, sizeof(msg));
        msg.cmd_type = LTTNG_CONSUMER_DESTROY_CHANNEL;
        msg.u.destroy_channel.key = ua_chan->key;
 
@@ -469,6 +471,7 @@ int ust_consumer_metadata_request(struct consumer_socket *socket)
                        DBG("PID registry not found for session id %" PRIu64,
                                        request.session_id_per_pid);
 
+                       memset(&msg, 0, sizeof(msg));
                        msg.cmd_type = LTTNG_ERR_UND;
                        (void) consumer_send_msg(socket, &msg);
                        /*
This page took 0.024847 seconds and 5 git commands to generate.