mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avutil/hwcontext_vulkan: fix resource leak on alloc_mem failure
Fix by using goto fail so that vulkan_frame_free() properly cleans up all previously created resources.
This commit is contained in:
@@ -3568,7 +3568,7 @@ static int vulkan_map_from_drm_frame_desc(AVHWFramesContext *hwfc, AVVkFrame **f
|
||||
&f->flags, &f->mem[i]);
|
||||
if (err) {
|
||||
close(idesc.fd);
|
||||
return err;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
f->size[i] = req2.memoryRequirements.size;
|
||||
|
||||
Reference in New Issue
Block a user