---
 src/hcom.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/hcom.c b/src/hcom.c
index e76820e..c62b020 100644
--- a/src/hcom.c
+++ b/src/hcom.c
@@ -432,9 +432,10 @@ static int stopwrite(sox_format_t * ft)
   int rc = SOX_SUCCESS;
 
   /* Compress it all at once */
-  if (compressed_len)
+  if (compressed_len) {
     compress(ft, &compressed_data, (int32_t *)&compressed_len);
-  free(p->data);
+    free(p->data);
+  }
 
   /* Write the header */
   lsx_writebuf(ft, "\000\001A", (size_t) 3); /* Dummy file name "A" */
-- 
2.5.0


------------------------------------------------------------------------------
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

Reply via email to