Ack
On 04/15/2012 11:01 PM, Marc-André Lureau wrote:
If we don't clear the glz dictionnary, this might lead to
corrupted/invalid dictionnary and invalid memory allocation due
unbounded increase of dictionnary size
---
  gtk/spice-session.c |    8 ++++++--
  1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index d30d089..02b35f3 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -1122,9 +1122,9 @@ gboolean 
spice_session_get_client_provided_socket(SpiceSession *session)
  }

  G_GNUC_INTERNAL
-void spice_session_switching_disconnect(SpiceSession *session)
+void spice_session_switching_disconnect(SpiceSession *self)
  {
-    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(self);
      struct channel *item;
      RingItem *ring, *next;

@@ -1141,6 +1141,10 @@ void spice_session_switching_disconnect(SpiceSession 
*session)
      }

      g_warn_if_fail(!ring_is_empty(&s->channels)); /* ring_get_length() == 1 */
+
+    spice_session_palettes_clear(self);
+    spice_session_images_clear(self);
+    glz_decoder_window_clear(s->glz_window);
  }

  G_GNUC_INTERNAL

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to