[java-atk-wrapper] Add missing unref



commit 6a2005fd9dce6f1de851ddb2b259d087cf596a89
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date:   Wed Jul 10 23:12:36 2019 +0200

    Add missing unref

 jni/src/jawobject.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/jni/src/jawobject.c b/jni/src/jawobject.c
index 3ced9a4..7a32240 100644
--- a/jni/src/jawobject.c
+++ b/jni/src/jawobject.c
@@ -264,7 +264,9 @@ jaw_object_get_name (AtkObject *atk_obj)
       AtkObject *child = atk_selection_ref_selection(selection, 0);
       if (child != NULL)
       {
-        return atk_object_get_name(child);
+        const gchar* name = atk_object_get_name(child);
+        g_object_unref(child);
+        return name;
       }
     }
   }


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