[Spice-devel] [PATCH] main_channel: fix double release of migration target data

Alon Levy alevy at redhat.com
Thu May 23 14:26:49 PDT 2013


> If client_migrate_info was called once with cert-host-subject and
> then again without cert-host-subject, on a third call to
> client_migrate info, the cert-host-subject from the first call would
> have been freed for the second time.

ACK

> ---
>  server/main_channel.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/server/main_channel.c b/server/main_channel.c
> index 4cf7e19..233e633 100644
> --- a/server/main_channel.c
> +++ b/server/main_channel.c
> @@ -671,6 +671,8 @@ static void main_channel_fill_mig_target(MainChannel
> *main_channel, RedsMigSpice
>      free(main_channel->mig_target.cert_subject);
>      if (mig_target->cert_subject) {
>          main_channel->mig_target.cert_subject =
>          spice_strdup(mig_target->cert_subject);
> +    } else {
> +        main_channel->mig_target.cert_subject = NULL;
>      }
>      main_channel->mig_target.port = mig_target->port;
>      main_channel->mig_target.sport = mig_target->sport;
> --
> 1.8.1.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list