From e9d6e86fc806b1f43a8785e00527add211cfb786 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 24 Aug 2011 16:14:46 +0200 Subject: red_channel: Fix msg buf memleak on parser error Signed-off-by: Hans de Goede --- server/red_channel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/server/red_channel.c b/server/red_channel.c index 87320b47..8993cc37 100644 --- a/server/red_channel.c +++ b/server/red_channel.c @@ -130,6 +130,7 @@ static void red_peer_handle_incoming(RedsStream *stream, IncomingHandler *handle SPICE_VERSION_MINOR, &parsed_size, &parsed_free); if (parsed == NULL) { red_printf("failed to parse message type %d", handler->header.type); + handler->cb->release_msg_buf(handler->opaque, &handler->header, handler->msg); handler->cb->on_error(handler->opaque); return; } -- cgit