aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-01-29 08:23:01 +0100
committerMax Kellermann <max@duempel.org>2015-01-29 08:24:34 +0100
commit56662a703c82252d9d5ff7002d74ea28527aaa1d (patch)
tree34ad0c0b04661364b7ad376e4e2fd24a7310ff2b /src
parent8b5f47d3a327fb4fcc1fef6cb5c610a999aae82c (diff)
downloadmpd-56662a703c82252d9d5ff7002d74ea28527aaa1d.tar.gz
mpd-56662a703c82252d9d5ff7002d74ea28527aaa1d.tar.xz
mpd-56662a703c82252d9d5ff7002d74ea28527aaa1d.zip
decoder/DsdLib: free ID3 buffer right after id3_tag_parse()
Merge two free() calls.
Diffstat (limited to 'src')
-rw-r--r--src/decoder/plugins/DsdLib.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/decoder/plugins/DsdLib.cxx b/src/decoder/plugins/DsdLib.cxx
index 8ce1a94a3..180981620 100644
--- a/src/decoder/plugins/DsdLib.cxx
+++ b/src/decoder/plugins/DsdLib.cxx
@@ -136,16 +136,13 @@ dsdlib_tag_id3(InputStream &is,
}
struct id3_tag *id3_tag = id3_tag_parse(id3_buf, count);
- if (id3_tag == nullptr) {
- free(id3_buf);
+ free(id3_buf);
+ if (id3_tag == nullptr)
return;
- }
scan_id3_tag(id3_tag, handler, handler_ctx);
id3_tag_delete(id3_tag);
-
- free(id3_buf);
return;
}
#endif