server/smartcard: fix use after free

This commit is contained in:
Alon Levy 2011-05-24 13:19:09 +03:00
parent 31358b640b
commit 529dc40dc3

View File

@ -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)