Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 889 Bytes

0051-flac.git-952c93b2.patch

File metadata and controls

29 lines (23 loc) · 889 Bytes
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 952c93b2d71c2172d7df8e0d6a9321eeb68cb37a Mon Sep 17 00:00:00 2001
From: Erik de Castro Lopo <erikd@mega-nerd.com>
Date: Sun, 9 Apr 2017 15:17:06 +1000
Subject: [PATCH 51/69] metaflac: Fix a memory leak
---
src/metaflac/operations.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/src/metaflac/operations.c
+++ b/src/metaflac/operations.c
@@ -286,7 +286,8 @@ FLAC__bool do_shorthand_operations_on_fi
if(!FLAC__metadata_chain_read(chain, filename)) {
print_error_with_chain_status(chain, "%s: ERROR: reading metadata", filename);
- return false;
+ ok = false;
+ goto cleanup;
}
for(i = 0; i < options->ops.num_operations && ok; i++) {
@@ -325,6 +326,7 @@ FLAC__bool do_shorthand_operations_on_fi
print_error_with_chain_status(chain, "%s: ERROR: writing FLAC file", filename);
}
+ cleanup :
FLAC__metadata_chain_delete(chain);
return ok;