[Spice-commits] server/smartcard.c

Alon Levy alon at kemper.freedesktop.org
Tue May 24 06:10:54 PDT 2011


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

New commits:
commit 65350d2ab36c60e48bd41256674d16e343d927de
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 fed88a5..888b23a 100644
--- a/server/smartcard.c
+++ b/server/smartcard.c
@@ -344,10 +344,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