[Spice-commits] Branch '0.8' - server/smartcard.c

Alon Levy alon at kemper.freedesktop.org
Tue May 24 06:11:42 PDT 2011


 server/smartcard.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 529dc40dc3e86d9dffa6ea537b425bba2bb3937a
Author: Alon Levy <alevy at redhat.com>
Date:   Tue May 24 13:19:09 2011 +0300

    server/smartcard: fix use after free

diff --git a/server/smartcard.c b/server/smartcard.c
index 1698a38..9d72a7e 100644
--- a/server/smartcard.c
+++ b/server/smartcard.c
@@ -322,10 +322,10 @@ static void smartcard_channel_send_item(RedChannel *channel, PipeItem *item)
 
 static void smartcard_channel_release_pipe_item(RedChannel *channel, PipeItem *item, int item_pushed)
 {
-    free(item);
     if (item->type == PIPE_ITEM_TYPE_MSG) {
         free(((MsgItem*)item)->vheader);
     }
+    free(item);
 }
 
 static void smartcard_channel_disconnect(RedChannel *channel)


More information about the Spice-commits mailing list