Bug 531012 - libmetacity-private has lots of memory leaks
libmetacity-private has lots of memory leaks
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
trunk
Other All
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-05-02 06:43 UTC by Lin Ma
Modified: 2016-08-18 12:16 UTC (History)
1 user (show)

See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
memory leak (636 bytes, patch)
2008-05-02 06:51 UTC, Lin Ma
committed Details | Diff | Review

Description Lin Ma 2008-05-02 06:43:04 UTC
Steps to reproduce:
1. 
2. 
3. 


Stack trace:


Other information:
gnome-appearance-properties crashes on Solaris X86 due to this issue.
Comment 1 Lin Ma 2008-05-02 06:51:44 UTC
Created attachment 110264 [details] [review]
memory leak

By loading Solaris libumem.so to detect application memory issue, I found lots of libmetacity-private.so memory leaks:
libmetacity-private.so.0.1600.2`pos_tokenize
libmetacity-private.so.0.1600.2`meta_draw_spec_new

I found that token.d.v.name is assigned by g_strndup if token.type equals to POS_TOKEN_VARIABLE. It will be freed in free_tokens() in the same type. While it seems token.type sometimes can be changed in meta_theme_replace_constants() if the type is POS_TOKEN_VARIABLE, I'm not sure if it's the reason of lots of mem leaks.
Comment 2 Lin Ma 2008-05-02 06:55:25 UTC
Oh, please ignore my last sentence "I'm not sure if it's the reason of lots of
mem leaks".
Comment 3 Lin Ma 2008-05-12 02:09:28 UTC
After did more investigation, we found the memory issue is not the root reason of gnome-appearance-properties crashing on Solaris X86, so I downgrade the severity. But the issue is existing, so I still hope the patch can be accepted.
Comment 4 Thomas Thurman 2010-05-02 15:59:18 UTC
Review of attachment 110264 [details] [review]:

Good catch.  Committed.

Note You need to log in before you can comment on or make changes to this bug.