]> git.sesse.net Git - ffmpeg/commitdiff
lavfi/vulkan: fix 2 minor memory leaks
authorLynne <dev@lynne.ee>
Thu, 14 May 2020 20:52:53 +0000 (21:52 +0100)
committerLynne <dev@lynne.ee>
Sat, 23 May 2020 18:07:48 +0000 (19:07 +0100)
libavfilter/vulkan.c

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