shithub: mp3dec

Download patch

ref: ac052118a69556762070e38f56779795474fdb6c
parent: 759f0550f4dd60918423ef539e332a73a6065622
author: lieff <lieff@users.noreply.github.com>
date: Thu Feb 6 13:39:46 EST 2020

test: fix mem-leak when no ref-file provided

--- a/minimp3_test.c
+++ b/minimp3_test.c
@@ -200,8 +200,9 @@
         }
         if (file_out)
             fwrite(buffer, info.samples, sizeof(int16_t), file_out);
-        free(buffer);
     }
+    if (buffer)
+        free(buffer);
 
 #ifndef LIBFUZZER
     MSE /= total_samples ? total_samples : 1;