summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2013-05-23 16:59:04 -0400
committerYonit Halperin <yhalperi@redhat.com>2013-05-23 16:59:04 -0400
commit67471d046ba5ba6e17aeb9188de0085cca44423c (patch)
tree551d35b4e15366d6e14a9679838f816865ec3a4d
parentfd18dbaa02d45108f56dce173e4068082e250f40 (diff)
downloadspice-67471d046ba5ba6e17aeb9188de0085cca44423c.tar.gz
spice-67471d046ba5ba6e17aeb9188de0085cca44423c.tar.xz
spice-67471d046ba5ba6e17aeb9188de0085cca44423c.zip
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.
-rw-r--r--server/main_channel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/main_channel.c b/server/main_channel.c
index 4cf7e193..233e633d 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;