Re: [PATCH spice-server 07/11] Use GLib memory functions for RedsMigSpice::host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>


On Mon, 2017-09-11 at 16:15 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/main-channel.c | 4 ++--
>  server/reds.c         | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/server/main-channel.c b/server/main-channel.c
> index 9d2590aa8..d1fe8bd7d 100644
> --- a/server/main-channel.c
> +++ b/server/main-channel.c
> @@ -137,8 +137,8 @@ void
> main_channel_push_multi_media_time(MainChannel *main_chan, uint32_t
> time)
>  static void main_channel_fill_mig_target(MainChannel *main_channel,
> RedsMigSpice *mig_target)
>  {
>      spice_assert(mig_target);
> -    free(main_channel->mig_target.host);
> -    main_channel->mig_target.host = spice_strdup(mig_target->host);
> +    g_free(main_channel->mig_target.host);
> +    main_channel->mig_target.host = g_strdup(mig_target->host);
>      free(main_channel->mig_target.cert_subject);
>      if (mig_target->cert_subject) {
>          main_channel->mig_target.cert_subject =
> spice_strdup(mig_target->cert_subject);
> diff --git a/server/reds.c b/server/reds.c
> index 0b9ffa8da..acb25dd9f 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -2963,7 +2963,7 @@ static void reds_mig_release(RedServerConfig
> *config)
>  {
>      if (config->mig_spice) {
>          free(config->mig_spice->cert_subject);
> -        free(config->mig_spice->host);
> +        g_free(config->mig_spice->host);
>          free(config->mig_spice);
>          config->mig_spice = NULL;
>      }
> @@ -4116,7 +4116,7 @@ static int
> reds_set_migration_dest_info(RedsState *reds,
>      spice_migration = spice_new0(RedsMigSpice, 1);
>      spice_migration->port = port;
>      spice_migration->sport = secure_port;
> -    spice_migration->host = spice_strdup(dest);
> +    spice_migration->host = g_strdup(dest);
>      if (cert_subject) {
>          spice_migration->cert_subject = spice_strdup(cert_subject);
>      }
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]