[Spice-devel,1/3] Use parsed_free() to free parsed data

Submitted by Marc-André Lureau on April 18, 2012, 4:52 p.m.

Details

Message ID 1334767977-25426-1-git-send-email-marcandre.lureau@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Marc-André Lureau April 18, 2012, 4:52 p.m.
---
 server/snd_worker.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/server/snd_worker.c b/server/snd_worker.c
index 7bdd399..9cf1ebb 100644
--- a/server/snd_worker.c
+++ b/server/snd_worker.c
@@ -478,7 +478,7 @@  static void snd_receive(void* data)
                 }
                 if (!channel->handle_message(channel, parsed_size,
                                              header->get_msg_type(header), parsed)) {
-                    free(parsed);
+                    parsed_free(parsed);
                     snd_disconnect_channel(channel);
                     return;
                 }

Comments

On Wed, Apr 18, 2012 at 06:52:55PM +0200, Marc-André Lureau wrote:

ACK Series. Just note you left a FIXME in the last patch, although I'm
not sure why you'd want to assert there.

> ---
>  server/snd_worker.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/server/snd_worker.c b/server/snd_worker.c
> index 7bdd399..9cf1ebb 100644
> --- a/server/snd_worker.c
> +++ b/server/snd_worker.c
> @@ -478,7 +478,7 @@ static void snd_receive(void* data)
>                  }
>                  if (!channel->handle_message(channel, parsed_size,
>                                               header->get_msg_type(header), parsed)) {
> -                    free(parsed);
> +                    parsed_free(parsed);
>                      snd_disconnect_channel(channel);
>                      return;
>                  }
> -- 
> 1.7.10
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel