mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
fix memory leaks found with valgrind
This commit is contained in:
@@ -730,9 +730,17 @@ FLAC__bool test_bitbuffer()
|
||||
}
|
||||
printf("OK\n");
|
||||
|
||||
printf("testing free... OK\n");
|
||||
printf("testing free... ");
|
||||
FLAC__bitbuffer_free(bb);
|
||||
FLAC__bitbuffer_free(bbcopy);
|
||||
printf("OK\n");
|
||||
|
||||
printf("testing delete... ");
|
||||
FLAC__bitbuffer_delete(bb);
|
||||
FLAC__bitbuffer_delete(bb_zero);
|
||||
FLAC__bitbuffer_delete(bb_one);
|
||||
FLAC__bitbuffer_delete(bbcopy);
|
||||
printf("OK\n");
|
||||
|
||||
printf("\nPASSED!\n");
|
||||
return true;
|
||||
|
||||
@@ -482,6 +482,7 @@ static FLAC__bool test_level_1_()
|
||||
return die_("mismatch in min_blocksize");
|
||||
if(block->data.stream_info.max_blocksize != 576)
|
||||
return die_("mismatch in max_blocksize");
|
||||
FLAC__metadata_object_delete(block);
|
||||
|
||||
if(!FLAC__metadata_simple_iterator_next(iterator))
|
||||
return die_("forward iterator ended early");
|
||||
@@ -502,6 +503,7 @@ static FLAC__bool test_level_1_()
|
||||
/* check to see if some basic data matches (c.f. generate_file_()) */
|
||||
if(block->length != 1234)
|
||||
return die_("bad PADDING length");
|
||||
FLAC__metadata_object_delete(block);
|
||||
|
||||
if(FLAC__metadata_simple_iterator_next(iterator))
|
||||
return die_("forward iterator returned true but should have returned false");
|
||||
|
||||
Reference in New Issue
Block a user