projects
/
platform
/
core
/
uifw
/
at-spi2-atk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
770fcb6
)
Don't leak ref when processing a child-added signal with no object value
author
Mike Gorse
<mgorse@novell.com>
Mon, 12 Dec 2011 17:25:44 +0000
(11:25 -0600)
committer
Mike Gorse
<mgorse@novell.com>
Mon, 12 Dec 2011 17:25:44 +0000
(11:25 -0600)
atk-adaptor/accessible-cache.c
patch
|
blob
|
history
diff --git
a/atk-adaptor/accessible-cache.c
b/atk-adaptor/accessible-cache.c
index
4d5cdb3
..
fa6b561
100644
(file)
--- a/
atk-adaptor/accessible-cache.c
+++ b/
atk-adaptor/accessible-cache.c
@@
-318,7
+318,7
@@
child_added_listener (GSignalInvocationHint * signal_hint,
const GValue * param_values, gpointer data)
{
SpiCache *cache = spi_global_cache;
const GValue * param_values, gpointer data)
{
SpiCache *cache = spi_global_cache;
-
+ gboolean child_needs_ref = TRUE;
AtkObject *accessible;
AtkObject *child;
AtkObject *accessible;
AtkObject *child;
@@
-351,10
+351,12
@@
child_added_listener (GSignalInvocationHint * signal_hint,
child = g_value_get_pointer (param_values + 2);
if (!ATK_IS_OBJECT (child))
child = g_value_get_pointer (param_values + 2);
if (!ATK_IS_OBJECT (child))
- {
- child = atk_object_ref_accessible_child (accessible, index);
- }
- g_object_ref (child);
+ {
+ child = atk_object_ref_accessible_child (accessible, index);
+ child_needs_ref = FALSE;
+ }
+ if (child_needs_ref)
+ g_object_ref (child);
g_queue_push_tail (cache->add_traversal, child);
if (cache->add_pending_idle == 0)
g_queue_push_tail (cache->add_traversal, child);
if (cache->add_pending_idle == 0)