[parted-devel] Some more memory leak patches

Jim Meyering jim at meyering.net
Sun May 4 06:23:59 UTC 2008


Matt Davis <mattdavis9 at gmail.com> wrote:
> On Sat, May 03, 2008 at 02:01:43PM +0200, Jim Meyering wrote:
>> Matt Davis <mattdavis9 at gmail.com> wrote:
>> > Here are two more patches for some memory leaks, 0005 patches a leak that occurs
>> > of blocksize.  I hope these memory deallocation patches are not getting
>> > annoying.  Just felt like doing some contributing to parted.
>>
>> Hi Matt,
>>
>> Thanks for the leak-plugging.
>
> No problem.
>
>> Is each of the leaks already exposed by running "make check"?
>> If not, please tell us precisely how to provoke them,
>> or better still, include in each patch an addition that
>> will cause "make check" to exercise it.
>
> I was just running parted through valgrind, and testing various commands.  These
> leaks are nothing serious in size, however creating a test for these is probably
> not needed as they are merely syntactical in nature, (ie. just freeing allocated
> memory that was never being free'd)

Not "just"... ;-)
By adding simple tests like that, you would be increasing
test coverage, which is sorely needed.

For each patch, please at least tell how you ran parted
to expose the leak.  That's an important part of the bug fix.
Being able to reproduce the problem (automatically via the test
suite) and to ensure that it remains fixed is important.



More information about the parted-devel mailing list