Commit 51326870 authored by Moritz Grimm's avatar Moritz Grimm

Fix mdata_t leak on error

Found by Coverity
parent db8a5e34
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment