Bug 205956 - Potential memory leak in cg_merge.c
Summary: Potential memory leak in cg_merge.c
Status: RESOLVED INTENTIONAL
Alias: None
Product: valgrind
Classification: Developer tools
Component: cachegrind (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Nicholas Nethercote
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-02 09:53 UTC by Rémi Duraffort
Modified: 2014-11-17 22:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to solve the issue (911 bytes, patch)
2009-09-02 09:55 UTC, Rémi Duraffort
Details

Note You need to log in before you can comment on or make changes to this bug.
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.