diff mbox series

[FFmpeg-devel,2/3] lavu/hwcontext_vulkan: clear dangling pointers on map failure

Message ID 20220119134040.774-2-anton@khirnov.net
State Accepted
Commit 137c808f1aaf2b5641b0e7319f35bd9dd7866e6f
Headers show
Series [FFmpeg-devel,1/3] lavu/hwcontext_opencl: clear dangling pointers on map failure | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished

Commit Message

Anton Khirnov Jan. 19, 2022, 1:40 p.m. UTC
---
untested
---
 libavutil/hwcontext_vulkan.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 60a6cf6a91..ae19fc2ab6 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2927,6 +2927,7 @@  static int vulkan_map_from_drm(AVHWFramesContext *hwfc, AVFrame *dst,
 
 fail:
     vulkan_frame_free(hwfc->device_ctx->hwctx, (uint8_t *)f);
+    dst->data[0] = NULL;
     return err;
 }