summaryrefslogtreecommitdiffstats
path: root/server/smartcard.c
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-05-24 13:19:09 +0300
committerAlon Levy <alevy@redhat.com>2011-05-24 13:19:09 +0300
commit65350d2ab36c60e48bd41256674d16e343d927de (patch)
treea0e4962d060e2e7a0485e39e47e1318153101a19 /server/smartcard.c
parenta973e87a0587beb8d1217173e938047c89295fba (diff)
downloadspice-65350d2ab36c60e48bd41256674d16e343d927de.tar.gz
spice-65350d2ab36c60e48bd41256674d16e343d927de.tar.xz
spice-65350d2ab36c60e48bd41256674d16e343d927de.zip
server/smartcard: fix use after free
Diffstat (limited to 'server/smartcard.c')
-rw-r--r--server/smartcard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/smartcard.c b/server/smartcard.c
index fed88a5e..888b23a4 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)