[Spice-devel] [PATCH spice 1/5] red_channel: Fix msg buf memleak on parser error

Alon Levy alevy at redhat.com
Thu Aug 25 03:53:54 PDT 2011


On Thu, Aug 25, 2011 at 12:19:53PM +0200, Hans de Goede wrote:
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>

ACK series. Haven't tested this yet.

> ---
>  server/red_channel.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/server/red_channel.c b/server/red_channel.c
> index 87320b4..8993cc3 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;
>              }
> -- 
> 1.7.5.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list