[Spice-devel] [PATCH spice-server v2 15/23] display-channel: Use GLib memory functions

Jonathon Jongsma jjongsma at redhat.com
Fri Sep 22 21:14:14 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/display-channel.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/server/display-channel.c b/server/display-channel.c
> index fbdca265f..f7f778eea 100644
> --- a/server/display-channel.c
> +++ b/server/display-channel.c
> @@ -170,7 +170,7 @@ void monitors_config_unref(MonitorsConfig
> *monitors_config)
>      }
>  
>      spice_debug("freeing monitors config");
> -    free(monitors_config);
> +    g_free(monitors_config);
>  }
>  
>  static void monitors_config_debug(MonitorsConfig *mc)
> @@ -188,7 +188,7 @@ static MonitorsConfig*
> monitors_config_new(QXLHead *heads, ssize_t nheads, ssize
>  {
>      MonitorsConfig *mc;
>  
> -    mc = spice_malloc(sizeof(MonitorsConfig) + nheads *
> sizeof(QXLHead));
> +    mc = g_malloc(sizeof(MonitorsConfig) + nheads *
> sizeof(QXLHead));
>      mc->refs = 1;
>      mc->count = nheads;
>      mc->max_allowed = max;


More information about the Spice-devel mailing list