mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-08 19:07:20 +00:00
Clear "msg" pointers after releasing
Avoid possible dangling pointers. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
c02ae9835e
commit
e8643204aa
@ -1277,6 +1277,7 @@ static void red_channel_client_handle_incoming(RedChannelClient *rcc)
|
||||
if (bytes_read == -1) {
|
||||
red_channel_client_release_msg_buf(rcc, msg_type, msg_size,
|
||||
buffer->msg);
|
||||
buffer->msg = NULL;
|
||||
red_channel_client_disconnect(rcc);
|
||||
return;
|
||||
}
|
||||
@ -1296,6 +1297,7 @@ static void red_channel_client_handle_incoming(RedChannelClient *rcc)
|
||||
red_channel_client_release_msg_buf(rcc,
|
||||
msg_type, msg_size,
|
||||
buffer->msg);
|
||||
buffer->msg = NULL;
|
||||
red_channel_client_disconnect(rcc);
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user