From c9243262f04457f4dbead759136a53700ef45d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Tue, 20 May 2025 16:42:52 +0200 Subject: [PATCH] llvmpipe: Check allocated memory instead of argument This is likely a copy-paste error. CID: 1616035 Dereference after null check Part-of: --- src/gallium/drivers/llvmpipe/lp_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_fence.c b/src/gallium/drivers/llvmpipe/lp_fence.c index dc6cf4b61e9..ef4d1b62727 100644 --- a/src/gallium/drivers/llvmpipe/lp_fence.c +++ b/src/gallium/drivers/llvmpipe/lp_fence.c @@ -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);