[Genome] memory leaks in cartCheckout

Archana Thakkapallayil archanat at soe.ucsc.edu
Mon May 7 12:08:46 PDT 2007


Hello Adam,

Thanks very much for pointing this out. We agree that this is not 
something important enough to worry about now. Fixing it could cause 
side effect problems. However, we would be interested to fix this issue 
in the future.

Regards,

Archana
UCSC Genome Bioinformatics Group


Adam Wenocur wrote:
> Hi all,
>
> I was recently poking around the heap of the genome browser CGI  
> executables, and I noticed some peculiarities.
>
> Upon further inspection, I found that the cartCheckout function in  
> kent/src/hg/lib/cart.c is the source of some memory leaks:
>
> Instead of calling freeHash, cartCheckout should call  
> freeHashAndVals, since the values loaded into the cart are cloned  
> strings, and are otherwise orphaned.
> There is the possibility that this solution might break the use of  
> cart parameter strings that were not copied prior to checking out the  
> cart, however it seems not to have caused any ill effect on my genome  
> browser mirror.
>
> A second issue doesn't appear to be causing leaks, but may have the  
> potential to: cartCheckout should use cartDbFreeList instead  
> cartDbFree, since userInfo and sessionInfo are indirectly assigned by  
> cartDbLoadWhere in cartNew, and could point to linked lists.
>
> I'm aware that this isn't of great importance to the CGI binaries,  
> since cartCheckout  is usually called shortly before a program exits,  
> but I figure it couldn't hurt to note my observations.
>
> -Adam
> _______________________________________________
> Genome maillist  -  Genome at soe.ucsc.edu
> http://www.soe.ucsc.edu/mailman/listinfo/genome
>   


More information about the Genome mailing list