From b6b6b8f8bb56c2e010b9e126797b4e54c6875eb3 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Thu, 3 Feb 2011 15:05:03 +0000 Subject: util: Prevent transfer dangling pointer on map failure. --- src/gallium/auxiliary/util/u_inlines.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gallium') diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index fc4eb8fdd2e..01883271d6a 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -235,6 +235,7 @@ pipe_buffer_map_range(struct pipe_context *pipe, map = pipe->transfer_map( pipe, *transfer ); if (map == NULL) { pipe->transfer_destroy( pipe, *transfer ); + *transfer = NULL; return NULL; } -- cgit v1.2.3