After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 169414 - Memory leak in read_aliases
Memory leak in read_aliases
Status: RESOLVED FIXED
Product: bonobo-activation [was: oaf]
Classification: Deprecated
Component: general
cvs (head)
Other Linux
: Normal normal
: ---
Assigned To: Michael Meeks
bonobo qa
Depends on:
Blocks:
 
 
Reported: 2005-03-06 18:37 UTC by Aivars Kalvans
Modified: 2006-05-17 14:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (811 bytes, patch)
2005-03-07 00:03 UTC, Aivars Kalvans
none Details | Review
Much better way to save memory (13.44 KB, patch)
2005-05-16 12:25 UTC, Alexander Larsson
none Details | Review

Description Aivars Kalvans 2005-03-06 18:37:27 UTC
Valgrind report:

==32043== 11 bytes in 1 blocks are definitely lost in loss record 1216 of 5240
==32043==    at 0x1B903C4D: malloc (vg_replace_malloc.c:131)
==32043==    by 0x1C979B99: IA__g_malloc (gmem.c:137)
==32043==    by 0x1C98C5B1: IA__g_strdup (gstrfuncs.c:90)
==32043==    by 0x1C82CB93: read_aliases (bonobo-activation-get-language-list.c:102)
==32043==    by 0x1C82CC47: unalias_lang (bonobo-activation-get-language-list.c:128)
==32043==    by 0x1C82D1CC: bonobo_activation_i18n_get_language_list
(bonobo-activation-get-language-list.c:361)
==32043==    by 0x1C82D50D: get_lang_list (bonobo-activation-client.c:182)
==32043==    by 0x1C82D5EC: bonobo_activation_register_client
(bonobo-activation-client.c:221)
==32043==    by 0x1C8300F8: bonobo_activation_existing_set
(bonobo-activation-base-service.c:325)
==32043==    by 0x1C830492: bonobo_activation_internal_service_get_extended
(bonobo-activation-base-service.c:434)
==32043==    by 0x1C830522: bonobo_activation_service_get
(bonobo-activation-base-service.c:461)
==32043==    by 0x1C832B59: bonobo_activation_activation_context_get
(bonobo-activation-init.c:208)
==32043==    by 0x1C832B77: bonobo_activation_object_directory_get
(bonobo-activation-init.c:222)
==32043==    by 0x1C831191: bonobo_activation_register_active_server_ext
(bonobo-activation-register.c:287)
==32043==    by 0x1C8310B9: bonobo_activation_register_active_server
(bonobo-activation-register.c:222)
==32043==    by 0x1C831558: bonobo_activation_active_server_register
(bonobo-activation-register.c:418)
==32043==    by 0x806280E: terminal_register_as_factory (terminal.c:3768)
==32043==    by 0x806284F: terminal_invoke_factory (terminal.c:3784)
==32043==    by 0x805E625: main (terminal.c:1698)
Comment 1 Aivars Kalvans 2005-03-07 00:03:34 UTC
Created attachment 38351 [details] [review]
patch

Looks like there was a typo
Comment 2 Kjartan Maraas 2005-05-12 10:17:53 UTC
Michael, can you review this patch please?
Comment 3 Michael Meeks 2005-05-12 13:23:05 UTC
no idea - that code looks scary - particularly that key/values seem not to share
obvious roles - ie. we insert 'shared_q' as both a key and a value:

	  g_hash_table_insert (alias_table, shared_q, NULL);
	}
	g_hash_table_insert (alias_table, buf, shared_q);

you'd need to get the original author to unwind / approve what's going on there,
it's not obvious to me.
Comment 4 Kjartan Maraas 2005-05-13 21:15:27 UTC
Alex, this is your code, right? Could you comment on the proposed patch?
Comment 5 Alexander Larsson 2005-05-16 12:24:13 UTC
Since gtk 2.6 we should be using g_get_language_list() instead anyway. This
avoids using lots of memory.

Attaching patch.
Comment 6 Alexander Larsson 2005-05-16 12:25:00 UTC
Created attachment 46482 [details] [review]
Much better way to save memory
Comment 7 Allison Karlitskaya (desrt) 2005-05-16 20:44:21 UTC
Please see bug 168948.  The fix needs to be made because this code should be
moved to libgnome (and not killed outright.)
Comment 8 Michael Meeks 2006-05-17 14:02:10 UTC
So - we committed Alex's fix - so this should be closed I believe.