ape: add missing g_free in error path
This commit is contained in:
parent
65772a74e0
commit
affb4bd923
@ -60,8 +60,10 @@ ape_scan_internal(FILE *fp, tag_ape_callback_t callback, void *ctx)
|
|||||||
assert(remaining > 10);
|
assert(remaining > 10);
|
||||||
|
|
||||||
char *buffer = g_malloc(remaining);
|
char *buffer = g_malloc(remaining);
|
||||||
if (fread(buffer, 1, remaining, fp) != remaining)
|
if (fread(buffer, 1, remaining, fp) != remaining) {
|
||||||
|
g_free(buffer);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* read tags */
|
/* read tags */
|
||||||
unsigned n = GUINT32_FROM_LE(footer.count);
|
unsigned n = GUINT32_FROM_LE(footer.count);
|
||||||
|
Loading…
Reference in New Issue
Block a user