History

lavfi/vulkan: fix 2 minor memory leaks

Lynne committed 6 years ago

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

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vulkan.c+4−1
@@ -822,6 +822,7 @@ int ff_vk_compile_shader(AVFilterContext *avctx, SPIRVShader *shd, · 821 unmodified lines
822822 &shd->shader.module);
823823
824824 /* Free the GLSlangResult struct */
825+ av_free(res->data);
825826 av_free(res);
826827
827828 if (ret != VK_SUCCESS) {
@@ -1228,8 +1229,10 @@ void ff_vk_filter_uninit(AVFilterContext *avctx) · 400 unmodified lines
12281229
12291230 glslang_uninit();
12301231
1231− for (int i = 0; i < s->samplers_num; i++)
1232+ for (int i = 0; i < s->samplers_num; i++) {
12321233 vkDestroySampler(s->hwctx->act_dev, *s->samplers[i], s->hwctx->alloc);
1234+ av_free(s->samplers[i]);
1235+ }
12331236 av_freep(&s->samplers);
12341237
12351238 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