[Spice-commits] server/red-channel-client.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Wed Feb 15 12:27:53 UTC 2017
server/red-channel-client.c | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit e8643204aaaeed7f8f0a356584af8e3c79937fc8
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Fri Feb 10 21:15:15 2017 +0000
Clear "msg" pointers after releasing
Avoid possible dangling pointers.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/server/red-channel-client.c b/server/red-channel-client.c
index 9ab22e4..32db186 100644
--- a/server/red-channel-client.c
+++ b/server/red-channel-client.c
@@ -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;
}
More information about the Spice-commits
mailing list