diff options
author | Milan Crha <mcrha@redhat.com> | 2010-09-08 00:39:46 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-09-08 00:39:46 +0800 |
commit | 101305e1c7dc24f5a40e80a900b0777b2634722f (patch) | |
tree | cc4fbb384d94d045c192c2b338e8f76db5b9c312 /composer | |
parent | ba5bb60860c0e0eff92cd7d2c4ae098fa107c331 (diff) | |
download | gsoc2013-evolution-101305e1c7dc24f5a40e80a900b0777b2634722f.tar gsoc2013-evolution-101305e1c7dc24f5a40e80a900b0777b2634722f.tar.gz gsoc2013-evolution-101305e1c7dc24f5a40e80a900b0777b2634722f.tar.bz2 gsoc2013-evolution-101305e1c7dc24f5a40e80a900b0777b2634722f.tar.lz gsoc2013-evolution-101305e1c7dc24f5a40e80a900b0777b2634722f.tar.xz gsoc2013-evolution-101305e1c7dc24f5a40e80a900b0777b2634722f.tar.zst gsoc2013-evolution-101305e1c7dc24f5a40e80a900b0777b2634722f.zip |
Various memory leaks
Diffstat (limited to 'composer')
-rw-r--r-- | composer/e-composer-private.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c index ed9e19096f..d4dcb46126 100644 --- a/composer/e-composer-private.c +++ b/composer/e-composer-private.c @@ -405,17 +405,22 @@ e_composer_private_constructed (EMsgComposer *composer) void e_composer_private_dispose (EMsgComposer *composer) { - GConfBridge *bridge; - GArray *array; - guint binding_id; - - bridge = gconf_bridge_get (); - array = composer->priv->gconf_bridge_binding_ids; + if (composer->priv->gconf_bridge_binding_ids) { + GConfBridge *bridge; + GArray *array; + guint binding_id; + + bridge = gconf_bridge_get (); + array = composer->priv->gconf_bridge_binding_ids; + + while (array->len > 0) { + binding_id = g_array_index (array, guint, 0); + gconf_bridge_unbind (bridge, binding_id); + g_array_remove_index_fast (array, 0); + } - while (array->len > 0) { - binding_id = g_array_index (array, guint, 0); - gconf_bridge_unbind (bridge, binding_id); - g_array_remove_index_fast (array, 0); + g_array_free (composer->priv->gconf_bridge_binding_ids, TRUE); + composer->priv->gconf_bridge_binding_ids = NULL; } if (composer->priv->shell != NULL) { |