提交 da399e21 编写于 作者: G Gautam Ramakrishnan 提交者: Michael Niedermayer

libswscale/utils.c: Fix bug #8255

Bug #8255 points out a double free error in libwscale/utils.c file.
The double free is because the pointer to cascaded_context of an
sw_context is not set to NULL after freeing it. When the sw_context
is later freed, sws_freeContext is called on the cascaded_context,
causing a double free.
Signed-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 5c151e14
......@@ -1502,6 +1502,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
ff_free_filters(c2);
if (ff_init_filters(c2) < 0) {
sws_freeContext(c2);
c->cascaded_context[1] = NULL;
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册