Use reference counting for RedPipeItem

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
Frediano Ziglio 2016-05-15 20:51:13 +01:00
parent 879b280049
commit c6fa38f468
2 changed files with 2 additions and 2 deletions

View File

@ -578,7 +578,7 @@ static void red_channel_client_send_item(RedChannelClient *rcc, RedPipeItem *ite
rcc->channel->channel_cbs.send_item(rcc, item);
return;
}
free(item);
red_pipe_item_unref(item);
}
static inline void red_channel_client_release_sent_item(RedChannelClient *rcc)

View File

@ -431,7 +431,7 @@ static void spicevmc_red_channel_send_item(RedChannelClient *rcc,
break;
default:
spice_error("bad pipe item %d", item->type);
free(item);
red_pipe_item_unref(item);
return;
}
red_channel_client_begin_send_message(rcc);