History

lavfi/vulkan: fix 2 minor memory leaks

Lynne committed 6 years ago

Commit fac17fd1 parent dc9cf7f1 file · +4 −1Browse files

Unified · Split

libavfilter/vulkan.c+4−1
@@ -822,6 +822,7 @@ int ff_vk_compile_shader(AVFilterContext *avctx, SPIRVShader *shd, · 821 unmodified lines
822 &shd->shader.module);822 &shd->shader.module);
823 823
824 /* Free the GLSlangResult struct */824 /* Free the GLSlangResult struct */
825 av_free(res->data);
825 av_free(res);826 av_free(res);
826 827
827 if (ret != VK_SUCCESS) {828 if (ret != VK_SUCCESS) {
@@ -1228,8 +1229,10 @@ void ff_vk_filter_uninit(AVFilterContext *avctx) · 400 unmodified lines
1228 1229
1229 glslang_uninit();1230 glslang_uninit();
1230 1231
1231 for (int i = 0; i < s->samplers_num; i++)1232 for (int i = 0; i < s->samplers_num; i++) {
1232 vkDestroySampler(s->hwctx->act_dev, *s->samplers[i], s->hwctx->alloc);1233 vkDestroySampler(s->hwctx->act_dev, *s->samplers[i], s->hwctx->alloc);
1234 av_free(s->samplers[i]);
1235 }
1233 av_freep(&s->samplers);1236 av_freep(&s->samplers);
1234 1237
1235 for (int i = 0; i < s->pipelines_num; i++)1238 for (int i = 0; i < s->pipelines_num; i++)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t