#278 Possible memory leak (1 block still reachable)

v1.1.2
closed
5
2013-10-20
2013-10-11
J. Riesmeier
No

We are using your great logging framework for our Open Source DICOM toolkit DCMTK (see http://www.dcmtk.org/). While checking one of our tools with valgrind on a recent Linux system with gcc, I found a possible memory leak that is reported as "4 bytes in 1 blocks are still reachable in loss record 1 of 1".

After digging a little more into the details, I found that the attached patch fixes this issue. The patch applies to both the most recent release (version 1.1.1) and the trunk at github.

What do you think about it? Am I doing the right thing or do things get worse with this patch?

  • Jörg
1 Attachments

Discussion

    • labels: --> fixed, v1.1.2
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,4 @@
    -We are using your great logging framework for our Open Source DICOM toolkit DCMTK (see http://www.dcmtk.org/). While checking one of our tools with valgrind on a recent Linux system with gcc, I found a possible memory leak that is reported as "4 bytes in 1 blocks are still reachable in loss record 1 of 1".
    +We are using your great logging framework for our Open Source DICOM toolkit DCMTK (see <http://www.dcmtk.org/>). While checking one of our tools with valgrind on a recent Linux system with gcc, I found a possible memory leak that is reported as "4 bytes in 1 blocks are still reachable in loss record 1 of 1".
    
     After digging a little more into the details, I found that the attached patch fixes this issue. The patch applies to both the most recent release (version 1.1.1) and the trunk at github.
    
    • status: open --> closed
    • assigned_to: Václav Zeman
    • Group: future --> v1.1.2
     
  • Good catch. Thank you for the patch. It is committed. I will push it later today.