csplit: fix a memory leak per input buffer
authorPádraig Brady <P@draigBrady.com>
Wed, 10 Nov 2010 14:35:17 +0000 (14:35 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 11 Nov 2010 01:40:12 +0000 (01:40 +0000)
commit0339eb4598600024cedca14a7e882c1737dd2d82
treea83d8af40ed3fa2382f8720c0f74aaa8fad644f3
parent7727908335ef1049deac42851026ed8bf5ae2734
csplit: fix a memory leak per input buffer

* src/csplit.c (free_buffer): Also free the line offsets buffers
(remove_line): Also free the containing structure
* tests/misc/csplit-heap: A new test to trigger with leaks of
this magnitude.
* tests/Makefile.am: Reference the new test
* NEWS: Mention the fix
Reported by David Hofstee
NEWS
src/csplit.c
tests/Makefile.am
tests/misc/csplit-heap [new file with mode: 0755]