Fix memory leak in atspi_accessible_get_role_name
[platform/upstream/at-spi2-core.git] / atspi / atspi-event-listener.c
index 9152054..e545bda 100644 (file)
@@ -117,7 +117,7 @@ callback_unref (gpointer callback)
 
 /**
  * atspi_event_listener_new:
- * @callback: (scope notified): An #AtspiEventListenerSimpleCB to be called
+ * @callback: (scope notified): An #AtspiEventListenerCB to be called
  * when an event is fired.
  * @user_data: (closure): data to pass to the callback.
  * @callback_destroyed: A #GDestroyNotify called when the listener is freed
@@ -556,7 +556,6 @@ atspi_event_listener_register_from_callback (AtspiEventListenerCB callback,
 {
   EventListenerEntry *e;
   DBusError d_error;
-  DBusMessage *message, *reply;
   GPtrArray *matchrule_array;
   gint i;
 
@@ -802,6 +801,9 @@ detail_matches_listener (const char *event_detail, const char *listener_detail)
   if (!listener_detail)
     return TRUE;
 
+  if (!event_detail)
+    return (listener_detail ? FALSE : TRUE);
+
   return !(listener_detail [strcspn (listener_detail, ":")] == '\0'
                ? strncmp (listener_detail, event_detail,
                           strcspn (event_detail, ":"))