Use GLib memory functions for SpiceChannelEventInfo

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
Frediano Ziglio 2017-09-19 18:52:57 +01:00
parent b30f57dca4
commit 68d5f90774
2 changed files with 2 additions and 2 deletions

View File

@ -417,7 +417,7 @@ RedsStream *reds_stream_new(RedsState *reds, int socket)
stream = g_malloc0(sizeof(RedsStream) + sizeof(RedsStreamPrivate));
stream->priv = (RedsStreamPrivate *)(stream+1);
stream->priv->info = spice_new0(SpiceChannelEventInfo, 1);
stream->priv->info = g_new0(SpiceChannelEventInfo, 1);
stream->priv->reds = reds;
stream->priv->core = reds_get_core_interface(reds);
reds_stream_set_socket(stream, socket);

View File

@ -325,7 +325,7 @@ void reds_handle_channel_event(RedsState *reds, int event, SpiceChannelEventInfo
reds->core.channel_event(&reds->core, event, info);
if (event == SPICE_CHANNEL_EVENT_DISCONNECTED) {
free(info);
g_free(info);
}
}