Commit eda1ff2d authored by François Cartegnie's avatar François Cartegnie 🤞

codec: opus: fix leak

parent 9d930e85
......@@ -402,12 +402,18 @@ int opus_write_header(uint8_t **p_extra, int *i_extra, OpusHeader *header, const
data[1] = (unsigned char *) comments;
size[1] = comments_length;
*i_extra = 0;
*p_extra = NULL;
for (unsigned i = 0; i < ARRAY_SIZE(data); ++i)
{
if (xiph_AppendHeaders(i_extra, (void **) p_extra, size[i], data[i]))
{
*i_extra = 0;
free(*p_extra);
*p_extra = NULL;
}
}
return 0;
}
......
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