diff options
author | Ilia Mirkin <[email protected]> | 2015-09-26 13:45:28 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-09-28 02:38:58 -0400 |
commit | 5bff12ecb403356d7848dc02696c618b68a324f1 (patch) | |
tree | f1f975403e0796a7f2cf91c306a723afd6c42047 /src | |
parent | 6dd059fefe2c8c8a5337a646ab8772ebad8f811b (diff) |
gallium/util: avoid unreferencing random memory on buffer alloc failure
Found by Coverity
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Albert Freeman <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 2fbf69c67d2..b7b1ece389b 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -2065,7 +2065,7 @@ void util_blitter_clear_buffer(struct blitter_context *blitter, struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; struct pipe_context *pipe = ctx->base.pipe; struct pipe_vertex_buffer vb = {0}; - struct pipe_stream_output_target *so_target; + struct pipe_stream_output_target *so_target = NULL; unsigned offsets[PIPE_MAX_SO_BUFFERS] = {0}; assert(num_channels >= 1); |