[at-spi2-core] Do not free a key listener's bus name and path twice



commit 0e17f00458f148899f75ce094e174d1c1c271780
Author: Mike Gorse <mgorse novell com>
Date:   Fri Mar 18 15:30:49 2011 -0700

    Do not free a key listener's bus name and path twice

 registryd/deviceeventcontroller.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c
index 674679d..2df09d0 100644
--- a/registryd/deviceeventcontroller.c
+++ b/registryd/deviceeventcontroller.c
@@ -859,10 +859,13 @@ spi_listener_clone_free (DEControllerListener *clone)
 static void
 spi_dec_listener_free (DEControllerListener    *listener)
 {
-  g_free (listener->bus_name);
-  g_free (listener->path);
   if (listener->type == SPI_DEVICE_TYPE_KBD) 
     spi_key_listener_data_free ((DEControllerKeyListener *) listener);
+  else
+  {
+    g_free (listener->bus_name);
+    g_free (listener->path);
+  }
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]