Bug 205956

Summary: Potential memory leak in cg_merge.c
Product: [Developer tools] valgrind Reporter: Rémi Duraffort <ivoire>
Component: cachegrindAssignee: Nicholas Nethercote <njn>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: florian
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch to solve the issue

Description Rémi Duraffort 2009-09-02 09:53:58 UTC
Version:           svn (using Devel)
Compiler:          gcc 4.3.2 
OS:                Linux
Installed from:    Compiled sources

In cachegrind/cg_merge.c the functions dopy_FileFn, new_Counts and new_Counts_Zeroed can leak memory if malloc function failed.
Comment 1 Rémi Duraffort 2009-09-02 09:55:22 UTC
Created attachment 36624 [details]
Patch to solve the issue
Comment 2 Florian Krohm 2014-11-17 22:00:40 UTC
When cg_merge runs out of memory it will terminate the process. In that case memory leaks are not important to fix and we don't bother with them.