DBH_RUN_FILE memory leak

edscott edscott at prodigy.net.mx
Thu Sep 16 15:23:51 CEST 2004


El mar, 14-09-2004 a las 13:18, Jasper Huijsmans escribió:
> Hi edscott,
> 
> I was looking at xfrun for necessary basedir spec changes hen I found 
> this memory leak:
> 
> DBH_RUN_FILE is defined as a comma separated list of strings to be used 
> for building the file name. The definition is:
> 
> # define XFCE_USER_CACHE_DIR xfce_resource_save_location 
> (XFCE_RESOURCE_CACHE,"/",TRUE),"xfce4"
> 
> #define RUN_DBH_FILE XFCE_USER_CACHE_DIR,"xfce4-modules","runlist.2.dbh"
> 
> xfce_resource_save_location() allocates memory for the return value. 
> Using g_build_filename (DBH_RUN_FILE, NULL); leaks this memory.
> 
> I haven't really looked into the effort that is required to fix this 
> everywhere.

Oh. Originally XFCE_USER_CACHE_DIR was g_get_home_dir(),".xfce4" where
no memory was leaked. 

Thank you for the information. I will fix the problem in a short while
(affects xfrun4 and xffm). 


regards,

Edscott




More information about the Xfce4-dev mailing list