Mesa (master): util: Prevent transfer dangling pointer on map failure.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Thu Feb 3 15:15:32 UTC 2011
Module: Mesa
Branch: master
Commit: b6b6b8f8bb56c2e010b9e126797b4e54c6875eb3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b6b6b8f8bb56c2e010b9e126797b4e54c6875eb3
Author: José Fonseca <jfonseca at vmware.com>
Date: Thu Feb 3 15:05:03 2011 +0000
util: Prevent transfer dangling pointer on map failure.
---
src/gallium/auxiliary/util/u_inlines.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index fc4eb8f..0188327 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;
}
More information about the mesa-commit
mailing list