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 525519 - Memory leaks when fetching attributes
Memory leaks when fetching attributes
Product: at-spi
Classification: Platform
Component: atkbridge
Other All
: Normal normal
: ---
Assigned To: Li Yuan
Li Yuan
Depends on:
Reported: 2008-04-01 10:26 UTC by Mike Gorse
Modified: 2008-09-27 08:49 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20

Patch. (3.77 KB, patch)
2008-04-01 10:30 UTC, Mike Gorse
committed Details | Review

Description Mike Gorse 2008-04-01 10:26:36 UTC
Please describe the problem:
There is code like this in several places:
retval->_buffer[i] = CORBA_STRING_DUP (g_str_concat (attr->name, ":", attr->value, NULL));

g_str_concat allocates memory that is never freed, since its return value is passed to CORBA_string_dup and then discarded.

Steps to reproduce:

Actual results:

Expected results:

Does this happen every time?

Other information:
Comment 1 Mike Gorse 2008-04-01 10:30:51 UTC
Created attachment 108405 [details] [review]
Comment 2 Matthias Clasen 2008-09-20 03:47:46 UTC
Patch looks obviously correct to me. 
Can we get this applied, Li ?
Comment 3 Li Yuan 2008-09-22 02:37:13 UTC
What is SPINST for? And I think the leak is not very obvious, I'd like to commit the patch after the freeze.
Comment 4 Matthias Clasen 2008-09-22 05:16:36 UTC
The SPINST stuff looks like leftover debug spew that should be omitted when committing the patch.