summaryrefslogtreecommitdiff
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
commit5427e6d7927173b067b27527b77ff23325fd2bd1 (patch)
tree8f308aaf95a4a4219859db9608aab643437572c3
parentdf7cac79a838323ab3705bca2098e5e813a4f54d (diff)
server/smartcard: fix use after free
-rw-r--r--server/smartcard.c2
1 files changed, 1 insertions, 1 deletions
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)