zero allocated class memory

This commit is contained in:
Josh Coalson
2002-08-03 22:05:11 +00:00
parent 189267013e
commit a7e4fb2629
4 changed files with 17 additions and 2 deletions

View File

@@ -254,6 +254,7 @@ FLAC__BitBuffer *FLAC__bitbuffer_new()
FLAC__BitBuffer *bb = (FLAC__BitBuffer*)malloc(sizeof(FLAC__BitBuffer));
if(0 != bb) {
memset(bb, 0, sizeof(FLAC__BitBuffer));
bb->buffer = 0;
bb->capacity = 0;
bb->blurbs = bb->bits = bb->total_bits = 0;