aux/trace: rzalloc the context struct
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 27 Jan 2022 18:51:06 +0000 (13:51 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 9 Mar 2022 03:54:37 +0000 (03:54 +0000)
this has problems if pointers are garbage

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14854>

src/gallium/auxiliary/driver_trace/tr_context.c

index 9465a66..6bbfb2a 100644 (file)
@@ -2265,7 +2265,7 @@ trace_context_create(struct trace_screen *tr_scr,
    if (!trace_enabled())
       goto error1;
 
-   tr_ctx = ralloc(NULL, struct trace_context);
+   tr_ctx = rzalloc(NULL, struct trace_context);
    if (!tr_ctx)
       goto error1;