llvmpipe: Check allocated memory instead of argument

This is likely a copy-paste error.

CID: 1616035 Dereference after null check
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35091>
This commit is contained in:
Corentin Noël 2025-05-20 16:42:52 +02:00 committed by Marge Bot
parent 09938eee85
commit c9243262f0

View file

@ -291,7 +291,7 @@ lp_create_fence_fd(struct pipe_context *pipe,
struct lp_fence *f = CALLOC_STRUCT(lp_fence);
if (!fence)
if (!f)
goto fail;
pipe_reference_init(&f->reference, 1);