From 5132687076dfc2047987fb979bddf59eab8813bb Mon Sep 17 00:00:00 2001 From: Moritz Grimm Date: Sat, 22 Feb 2020 23:22:06 +0100 Subject: [PATCH] Fix mdata_t leak on error Found by Coverity --- src/ezstream.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ezstream.c b/src/ezstream.c index d444da0..e56331f 100644 --- a/src/ezstream.c +++ b/src/ezstream.c @@ -285,8 +285,10 @@ openResource(stream_t stream, const char *filename, int *popenFlag, pCommandString = _build_reencode_cmd(extension, filename, cfg_stream, md); - if (NULL == pCommandString) + if (NULL == pCommandString) { + mdata_destroy(&md); return (NULL); + } if (md_p != NULL) *md_p = md; else