diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2011-07-18 12:37:25 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-07-18 22:03:34 +0200 |
commit | affb4bd923492913ffebb71c4f977a6bbf9ed257 (patch) | |
tree | 1f55d5f0ec467765d0d6355b28d19157ab075b52 /src/ape.c | |
parent | 65772a74e08af4b29466b3d41d42ec75d7e58788 (diff) | |
download | mpd-affb4bd923492913ffebb71c4f977a6bbf9ed257.tar.gz mpd-affb4bd923492913ffebb71c4f977a6bbf9ed257.tar.xz mpd-affb4bd923492913ffebb71c4f977a6bbf9ed257.zip |
ape: add missing g_free in error path
Diffstat (limited to '')
-rw-r--r-- | src/ape.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |