Unverified Commit fac17fd4 authored by Lynne's avatar Lynne

lavfi/vulkan: fix 2 minor memory leaks

parent dc9cf7f2
...@@ -822,6 +822,7 @@ int ff_vk_compile_shader(AVFilterContext *avctx, SPIRVShader *shd, ...@@ -822,6 +822,7 @@ int ff_vk_compile_shader(AVFilterContext *avctx, SPIRVShader *shd,
&shd->shader.module); &shd->shader.module);
/* Free the GLSlangResult struct */ /* Free the GLSlangResult struct */
av_free(res->data);
av_free(res); av_free(res);
if (ret != VK_SUCCESS) { if (ret != VK_SUCCESS) {
...@@ -1228,8 +1229,10 @@ void ff_vk_filter_uninit(AVFilterContext *avctx) ...@@ -1228,8 +1229,10 @@ void ff_vk_filter_uninit(AVFilterContext *avctx)
glslang_uninit(); glslang_uninit();
for (int i = 0; i < s->samplers_num; i++) for (int i = 0; i < s->samplers_num; i++) {
vkDestroySampler(s->hwctx->act_dev, *s->samplers[i], s->hwctx->alloc); vkDestroySampler(s->hwctx->act_dev, *s->samplers[i], s->hwctx->alloc);
av_free(s->samplers[i]);
}
av_freep(&s->samplers); av_freep(&s->samplers);
for (int i = 0; i < s->pipelines_num; i++) for (int i = 0; i < s->pipelines_num; i++)
......
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