[Spice-devel] [PATCH spice-server 09/11] reds: Use GLib memory functions for RedServerConfig

Jonathon Jongsma jjongsma at redhat.com
Mon Sep 18 21:59:49 UTC 2017


Acked-by: Jonathon Jongsma <jjongsma at redhat.com>


On Mon, 2017-09-11 at 16:15 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/reds.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/server/reds.c b/server/reds.c
> index 9b573987a..8906708d1 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -3501,7 +3501,7 @@ SPICE_GNUC_VISIBLE SpiceServer
> *spice_server_new(void)
>      const char *record_filename;
>      RedsState *reds = g_new0(RedsState, 1);
>  
> -    reds->config = spice_new0(RedServerConfig, 1);
> +    reds->config = g_new0(RedServerConfig, 1);
>      reds->config->default_channel_security =
>          SPICE_CHANNEL_SECURITY_NONE | SPICE_CHANNEL_SECURITY_SSL;
>      reds->config->renderers = g_array_sized_new(FALSE, TRUE,
> sizeof(uint32_t), RED_RENDERER_LAST);
> @@ -3715,7 +3715,7 @@ static void reds_config_free(RedServerConfig
> *config)
>      g_free(config->spice_name);
>      g_array_unref(config->renderers);
>      g_array_unref(config->video_codecs);
> -    free(config);
> +    g_free(config);
>  }
>  
>  SPICE_GNUC_VISIBLE void spice_server_destroy(SpiceServer *reds)


More information about the Spice-devel mailing list