shithub: sox

Download patch

ref: 68622b0a2e184bd95b3121f0eda654713cfa9e4d
parent: 4756224066b5a40e7c189e32e63c6148ae70e90b
author: robs <robs>
date: Fri Sep 11 12:18:26 EDT 2009

fix memory leak of format private data

--- a/ChangeLog
+++ b/ChangeLog
@@ -61,6 +61,7 @@
     single-threaded.
   o Fix mistaken file size with pipe input on Windows.  (Doug Cook)
   o Fix missing documentation for -R (repeatable).  (robs)
+  o Fix memory leak of format private data.  (Slawomir Testowy)
 
 Internal improvements:
 
--- a/src/formats.c
+++ b/src/formats.c
@@ -924,6 +924,7 @@
 
   if (ft->fp && ft->fp != stdin && ft->fp != stdout)
     xfclose(ft->fp, ft->io_type);
+  free(ft->priv);
   free(ft->filename);
   free(ft->filetype);
   sox_delete_comments(&ft->oob.comments);