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 627600 - password memory leak
password memory leak
Status: RESOLVED FIXED
Product: libgnome-keyring
Classification: Core
Component: General
2.31.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks: 627707
 
 
Reported: 2010-08-21 21:49 UTC by David Woodhouse
Modified: 2019-02-22 11:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Woodhouse 2010-08-21 21:49:42 UTC
==24539== 16 bytes in 1 blocks are definitely lost in loss record 6,186 of 27,015
==24539==    at 0x4A05255: realloc (vg_replace_malloc.c:476)
==24539==    by 0x35A0028E59: ??? (in /lib64/libdbus-1.so.3.4.0)
==24539==    by 0x35A00298E6: ??? (in /lib64/libdbus-1.so.3.4.0)
==24539==    by 0x35A0019C88: dbus_message_iter_get_signature (in /lib64/libdbus-1.so.3.4.0)
==24539==    by 0x3A5380A37F: ??? (in /usr/lib64/libgnome-keyring.so.0.1.1)
==24539==    by 0x3A53808A9B: ??? (in /usr/lib64/libgnome-keyring.so.0.1.1)
==24539==    by 0x35A000E4E9: ??? (in /lib64/libdbus-1.so.3.4.0)
==24539==    by 0x35A0010031: ??? (in /lib64/libdbus-1.so.3.4.0)
==24539==    by 0x35A0010F52: ??? (in /lib64/libdbus-1.so.3.4.0)
==24539==    by 0x3A53808B21: ??? (in /usr/lib64/libgnome-keyring.so.0.1.1)
==24539==    by 0x72BB62F: ep_keyring_lookup_passwords (e-passwords.c:431)
==24539==    by 0x72BC039: ep_get_password (e-passwords.c:900)
Comment 1 David Woodhouse 2010-08-21 21:49:54 UTC
==24539== 16 bytes in 2 blocks are definitely lost in loss record 6,187 of 27,015
==24539==    at 0x4A04481: calloc (vg_replace_malloc.c:418)
==24539==    by 0x35A001BBCB: ??? (in /lib64/libdbus-1.so.3.4.0)
==24539==    by 0x35A001BDFE: dbus_message_get_args_valist (in /lib64/libdbus-1.so.3.4.0)
==24539==    by 0x35A001BF1D: dbus_message_get_args (in /lib64/libdbus-1.so.3.4.0)
==24539==    by 0x3A53811222: ??? (in /usr/lib64/libgnome-keyring.so.0.1.1)
==24539==    by 0x3A53808A9B: ??? (in /usr/lib64/libgnome-keyring.so.0.1.1)
==24539==    by 0x35A000E4E9: ??? (in /lib64/libdbus-1.so.3.4.0)
==24539==    by 0x35A0010031: ??? (in /lib64/libdbus-1.so.3.4.0)
==24539==    by 0x35A0010F52: ??? (in /lib64/libdbus-1.so.3.4.0)
==24539==    by 0x3A53808B21: ??? (in /usr/lib64/libgnome-keyring.so.0.1.1)
==24539==    by 0x72BB62F: ep_keyring_lookup_passwords (e-passwords.c:431)
==24539==    by 0x72BBE61: ep_get_password (e-passwords.c:865)
Comment 2 Matthew Barnes 2010-08-27 15:12:11 UTC
Probably want to file this against libdbus, as it doesn't look like Evolution's fault, nor even libgnome-keyring's fault.
Comment 3 David Woodhouse 2010-08-27 15:14:30 UTC
Perhaps related to https://bugzilla.redhat.com/show_bug.cgi?id=626652 then?
Comment 4 Matthew Barnes 2010-08-27 16:26:06 UTC
Possibly.  Now that I look at this again I'm thinking this might be a libgnome-keyring leak after all, but it's hard to tell without debug symbols.

I'm not very familiar with the raw D-Bus API, but it looks like the "get" functions shown here are returning newly allocated memory, whereas the usual convention in GNOME is for "get" functions to return something that doesn't have to be freed or unreferenced.  Maybe libgnome-keyring is making that assumption with D-Bus?

I'll give D-Bus the benefit of the doubt and let the libgnome-keyring guys have a look at this.
Comment 5 Matthew Barnes 2010-08-27 16:27:41 UTC
It would be helpful if you could recapture these leaks with debug symbols for libdbus and libgnome-keyring.
Comment 6 Stef Walter 2010-08-29 13:19:52 UTC
Thanks for catching that David. Committed a fix:

commit e092343a03c2c7bc1dc6ed182e75b319519136a2
Author: Stef Walter <stef@memberwebs.com>
Date:   Sun Aug 29 13:18:44 2010 +0000

    Fix memory leak related to dbus_message_iter_get_signature()
    
    Discovered by David Woodhouse. Need to free memory returned
    by dbus_message_iter_get_signature()