diff options
author | Mike Gorse <mgorse@suse.com> | 2013-01-14 17:16:38 -0600 |
---|---|---|
committer | Mike Gorse <mgorse@suse.com> | 2013-01-14 17:16:38 -0600 |
commit | cea1eb7d46cdfd7156616bf57ee36009e4401cf1 (patch) | |
tree | 494afd96fa17ef2ad3adc959f1055602c3ed912f /atspi/atspi-accessible.c | |
parent | 1495d5f9a35efdb81ac90e9186784d13c4c9188e (diff) | |
download | at-spi2-core-cea1eb7d46cdfd7156616bf57ee36009e4401cf1.tar.gz |
Fix ref count leaks in atspi_accessible_get_application
Diffstat (limited to 'atspi/atspi-accessible.c')
-rw-r--r-- | atspi/atspi-accessible.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c index 6732d1c9..5f981998 100644 --- a/atspi/atspi-accessible.c +++ b/atspi/atspi-accessible.c @@ -799,6 +799,7 @@ atspi_accessible_get_application (AtspiAccessible *obj, GError **error) if (root) { g_object_unref (obj); + g_object_unref (parent); if (atspi_accessible_get_role (root, NULL) == ATSPI_ROLE_DESKTOP_FRAME) { g_object_unref (root); @@ -809,7 +810,11 @@ atspi_accessible_get_application (AtspiAccessible *obj, GError **error) } if (!parent || parent == obj || atspi_accessible_get_role (parent, NULL) == ATSPI_ROLE_DESKTOP_FRAME) + { + if (parent) + g_object_unref (parent); return obj; + } g_object_unref (obj); obj = parent; } |