Avoid free-before-initialize vulnerability in heap am: 6995c84 am: ca1a1ff am: b8c0a86 am: 02a513a
am: 680f668

* commit '680f668faee4cee465ea8fe6aab59a20417519e8':
  Avoid free-before-initialize vulnerability in heap
diff --git a/libFLAC/stream_decoder.c b/libFLAC/stream_decoder.c
index d13b23b..7dff737 100644
--- a/libFLAC/stream_decoder.c
+++ b/libFLAC/stream_decoder.c
@@ -1739,6 +1739,7 @@
 		if (obj->num_comments > 0) {
 			if (0 == (obj->comments = safe_malloc_mul_2op_p(obj->num_comments, /*times*/sizeof(FLAC__StreamMetadata_VorbisComment_Entry)))) {
 				decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
+				obj->num_comments = 0;
 				return false;
 			}
 			for (i = 0; i < obj->num_comments; i++) {