diff options
author | jcoalson <jcoalson> | 2002-08-03 22:05:11 +0000 |
---|---|---|
committer | jcoalson <jcoalson> | 2002-08-03 22:05:11 +0000 |
commit | 910d28a760543847346d2f0d65a4cfe604d78a8e (patch) | |
tree | e705c45d3cf20ba9f16818f32e758b6c25717136 /src/libFLAC/stream_decoder.c | |
parent | 506297ed56764a173fb8dcdec27d720a3ee45df0 (diff) | |
download | flac-arm-1.1.3-910d28a760543847346d2f0d65a4cfe604d78a8e.tar.gz |
zero allocated class memory
Diffstat (limited to 'src/libFLAC/stream_decoder.c')
-rw-r--r-- | src/libFLAC/stream_decoder.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index 540ae48a..a7a91549 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -146,17 +146,23 @@ FLAC__StreamDecoder *FLAC__stream_decoder_new() if(decoder == 0) { return 0; } + memset(decoder, 0, sizeof(FLAC__StreamDecoder)); + decoder->protected_ = (FLAC__StreamDecoderProtected*)malloc(sizeof(FLAC__StreamDecoderProtected)); if(decoder->protected_ == 0) { free(decoder); return 0; } + memset(decoder->protected_, 0, sizeof(FLAC__StreamDecoderProtected)); + decoder->private_ = (FLAC__StreamDecoderPrivate*)malloc(sizeof(FLAC__StreamDecoderPrivate)); if(decoder->private_ == 0) { free(decoder->protected_); free(decoder); return 0; } + memset(decoder->private_, 0, sizeof(FLAC__StreamDecoderPrivate)); + decoder->private_->input = FLAC__bitbuffer_new(); if(decoder->private_->input == 0) { free(decoder->private_); |