ffmpeg | branch: master | Lynne <d...@lynne.ee> | Thu May 14 21:52:53 2020 
+0100| [fac17fd46f0b2d8120c0634fd1249a246df4c995] | committer: Lynne

lavfi/vulkan: fix 2 minor memory leaks

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fac17fd46f0b2d8120c0634fd1249a246df4c995
---

 libavfilter/vulkan.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vulkan.c b/libavfilter/vulkan.c
index ff76ab15e9..ccf71cb7cd 100644
--- a/libavfilter/vulkan.c
+++ b/libavfilter/vulkan.c
@@ -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++)

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to