---
 src/ape.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/ape.c b/src/ape.c
index 4a4eaf8..6257fe6 100644
--- a/src/ape.c
+++ b/src/ape.c
@@ -60,8 +60,10 @@ ape_scan_internal(FILE *fp, tag_ape_callback_t callback, 
void *ctx)
        assert(remaining > 10);
 
        char *buffer = g_malloc(remaining);
-       if (fread(buffer, 1, remaining, fp) != remaining)
+       if (fread(buffer, 1, remaining, fp) != remaining) {
+               g_free(buffer);
                return false;
+       }
 
        /* read tags */
        unsigned n = GUINT32_FROM_LE(footer.count);
-- 
1.7.5.4


------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to