projects
/
platform
/
upstream
/
flac.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Memory and fd leak fixes - ID: 3436668
[platform/upstream/flac.git]
/
src
/
metaflac
/
operations_shorthand_picture.c
diff --git
a/src/metaflac/operations_shorthand_picture.c
b/src/metaflac/operations_shorthand_picture.c
index
549caca
..
bc51296
100644
(file)
--- a/
src/metaflac/operations_shorthand_picture.c
+++ b/
src/metaflac/operations_shorthand_picture.c
@@
-163,6
+163,8
@@
FLAC__bool export_pic_to(const char *filename, const FLAC__StreamMetadata *pictu
if(fwrite(picture->data.picture.data, 1, len, f) != len) {
fprintf(stderr, "%s: ERROR: writing PICTURE data to file\n", filename);
+ if(f != stdout)
+ fclose(f);
return false;
}