[virt-viewer] Fix crash after entering spice password (bz #880381)

Cole Robinson crobinso at fedoraproject.org
Fri Dec 14 22:08:20 UTC 2012


commit 3ba3804ca0526ff7b64c2c8bf06660bbb0b42480
Author: Cole Robinson <crobinso at redhat.com>
Date:   Fri Dec 14 17:08:17 2012 -0500

    Fix crash after entering spice password (bz #880381)

 0001-Don-t-free-SPICE-ticket-twice.patch |   29 +++++++++++++++++++++++++++++
 virt-viewer.spec                         |    8 +++++++-
 2 files changed, 36 insertions(+), 1 deletions(-)
---
diff --git a/0001-Don-t-free-SPICE-ticket-twice.patch b/0001-Don-t-free-SPICE-ticket-twice.patch
new file mode 100644
index 0000000..9132592
--- /dev/null
+++ b/0001-Don-t-free-SPICE-ticket-twice.patch
@@ -0,0 +1,29 @@
+From a4e588e3eacf4e5590ff98171a495f8fa0e37375 Mon Sep 17 00:00:00 2001
+Message-Id: <a4e588e3eacf4e5590ff98171a495f8fa0e37375.1355522395.git.crobinso at redhat.com>
+From: Christophe Fergeau <cfergeau at redhat.com>
+Date: Mon, 1 Oct 2012 18:22:04 +0200
+Subject: [PATCH] Don't free SPICE ticket twice
+
+Commit 2201a5a was supposed to free a SPICE ticket leak, but it's
+actually introducing a double-free as the SPICE ticket is
+unconditionally freed at the end of
+virt_viewer_session_spice_main_channel_event
+---
+ src/virt-viewer-session-spice.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
+index 5fcd7fb..2577f2b 100644
+--- a/src/virt-viewer-session-spice.c
++++ b/src/virt-viewer-session-spice.c
+@@ -326,7 +326,6 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel G_GNUC_UNUSED
+             gboolean openfd;
+ 
+             g_object_set(self->priv->session, "password", password, NULL);
+-            g_free(password);
+             g_object_get(self->priv->session, "client-sockets", &openfd, NULL);
+ 
+             if (openfd)
+-- 
+1.8.0.2
+
diff --git a/virt-viewer.spec b/virt-viewer.spec
index c769ba1..69af33f 100644
--- a/virt-viewer.spec
+++ b/virt-viewer.spec
@@ -25,12 +25,14 @@
 
 Name: virt-viewer
 Version: 0.5.4
-Release: 2%{?dist}%{?extra_release}
+Release: 3%{?dist}%{?extra_release}
 Summary: Virtual Machine Viewer
 Group: Applications/System
 License: GPLv2+
 URL: http://virt-manager.org/
 Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
+# Fix crash after entering spice password (bz 880381)
+Patch1: 0001-Don-t-free-SPICE-ticket-twice.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: openssh-clients
 Requires(post):   %{_sbindir}/update-alternatives
@@ -91,6 +93,7 @@ browsers.
 
 %prep
 %setup -q
+%patch1 -p1
 
 %build
 
@@ -172,6 +175,9 @@ update-desktop-database -q %{_datadir}/applications
 %endif
 
 %changelog
+* Fri Dec 14 2012 Cole Robinson <crobinso at redhat.com> - 0.5.4-3
+- Fix crash after entering spice password (bz #880381)
+
 * Sat Oct 13 2012 Chris Tyler <chris at tylers.info> - 0.5.4-2
 - Enabled spice support for ARM archs
 


More information about the scm-commits mailing list