[prevent][35992] Fix for resource leakage
[platform/upstream/at-spi2-core.git] / atspi / atspi-collection.c
index 9e1a7b5..c893b49 100644 (file)
@@ -81,10 +81,12 @@ static GArray *
 return_accessibles (DBusMessage *message)
 {
   DBusMessageIter iter, iter_array;
-  GArray *ret = g_array_new (TRUE, TRUE, sizeof (AtspiAccessible *));
+  GArray *ret;
 
   _ATSPI_DBUS_CHECK_SIG (message, "a(so)", NULL, NULL);
 
+  ret = g_array_new (TRUE, TRUE, sizeof (AtspiAccessible *));
+
   dbus_message_iter_init (message, &iter);
   dbus_message_iter_recurse (&iter, &iter_array);
 
@@ -261,6 +263,7 @@ atspi_collection_get_matches_from (AtspiCollection *collection,
 /**
  * atspi_collection_get_active_descendant:
  *
+* Returns: (transfer full): The active descendant of the given object.
  * Not yet implemented.
  **/
 AtspiAccessible *