diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-12-29 18:28:00 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-12-29 18:37:42 -0800 |
commit | dacae58710f7033d5295c50cf6262783350e938d (patch) | |
tree | c6fa8560291a61c8039769348917e7747d93f106 /Dialog.c | |
parent | 8df1a843a3a9f92399113688a350873a141bf995 (diff) |
Stop memory leak in XmuWriteBitmapDataToFile()
StripFilename() allocates a new string for its result, so after we're
done with it, free it instead of just losing the pointer to it.
Fixes errors found by Oracle Parfait 1.5.1 bug checking tool:
Error: Memory leak (CWE 401)
Memory leak of pointer basename allocated with StripFilename(filename)
at line 712 of Bitmap.c in function 'XmuWriteBitmapDataToFile'.
basename allocated at line 691 with StripFilename(filename).
basename leaks when i >= data_length at line 702.
Error: Memory leak (CWE 401)
Memory leak of pointer basename allocated with StripFilename(filename)
at line 715 of Bitmap.c in function 'XmuWriteBitmapDataToFile'.
basename allocated at line 691 with StripFilename(filename).
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'Dialog.c')
0 files changed, 0 insertions, 0 deletions