[Spice-devel] [PATCH spice-server v2 10/23] dispatcher: Use GLib memory functions
Jonathon Jongsma
jjongsma at redhat.com
Fri Sep 22 19:02:00 UTC 2017
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
On Wed, 2017-09-20 at 08:51 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/dispatcher.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/server/dispatcher.c b/server/dispatcher.c
> index 7fb706f8b..7e991403c 100644
> --- a/server/dispatcher.c
> +++ b/server/dispatcher.c
> @@ -112,7 +112,7 @@ dispatcher_finalize(GObject *object)
> close(self->priv->send_fd);
> close(self->priv->recv_fd);
> pthread_mutex_destroy(&self->priv->lock);
> - free(self->priv->payload);
> + g_free(self->priv->payload);
> G_OBJECT_CLASS(dispatcher_parent_class)->finalize(object);
> }
>
> @@ -352,7 +352,7 @@ void dispatcher_register_handler(Dispatcher
> *dispatcher, uint32_t message_type,
> msg->size = size;
> msg->ack = ack;
> if (msg->size > dispatcher->priv->payload_size) {
> - dispatcher->priv->payload = realloc(dispatcher->priv-
> >payload, msg->size);
> + dispatcher->priv->payload = g_realloc(dispatcher->priv-
> >payload, msg->size);
> dispatcher->priv->payload_size = msg->size;
> }
> }
More information about the Spice-devel
mailing list