[Spice-commits] server/main_channel.c

Yonit Halperin yhalperi at kemper.freedesktop.org
Fri May 24 01:01:15 PDT 2013


 server/main_channel.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 67471d046ba5ba6e17aeb9188de0085cca44423c
Author: Yonit Halperin <yhalperi at redhat.com>
Date:   Thu May 23 16:59:04 2013 -0400

    main_channel: fix double release of migration target data
    
    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.

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;


More information about the Spice-commits mailing list