Do not free a key listener's bus name and path twice
authorMike Gorse <mgorse@novell.com>
Fri, 18 Mar 2011 22:30:49 +0000 (15:30 -0700)
committerMike Gorse <mgorse@novell.com>
Sat, 19 Mar 2011 01:17:45 +0000 (18:17 -0700)
registryd/deviceeventcontroller.c

index 674679d..2df09d0 100644 (file)
@@ -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