mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
d3d12: Remove unnecessary NULL check.
Fix defect reported by Coverity Scan.
Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking pD3D12VideoBuffer suggests that it may
be null, but it has already been dereferenced on all paths leading to
the check.
Fixes: d8206f6286 ("d3d12: Add video decode implementation of pipe_video_codec")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16714>
This commit is contained in:
parent
2e9c53549b
commit
6dfaedd607
1 changed files with 1 additions and 3 deletions
|
|
@ -105,9 +105,7 @@ d3d12_video_buffer_create(struct pipe_context *pipe, const struct pipe_video_buf
|
|||
return &pD3D12VideoBuffer->base;
|
||||
|
||||
failed:
|
||||
if (pD3D12VideoBuffer != nullptr) {
|
||||
d3d12_video_buffer_destroy((struct pipe_video_buffer *) pD3D12VideoBuffer);
|
||||
}
|
||||
d3d12_video_buffer_destroy((struct pipe_video_buffer *) pD3D12VideoBuffer);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue