[Piglit] [PATCH] draw-pixels: Set pointer to NULL after free.

Vinson Lee vlee at freedesktop.org
Sat Dec 8 20:25:20 PST 2012


Fixes use after free defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/general/draw-pixels.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/general/draw-pixels.c b/tests/general/draw-pixels.c
index b03e4cd..2e5abe3 100644
--- a/tests/general/draw-pixels.c
+++ b/tests/general/draw-pixels.c
@@ -872,6 +872,7 @@ piglit_display(void)
 					break;
 				}
 				free(pixels);
+				pixels = NULL;
 			}
 		}
 	}
-- 
1.8.0.1



More information about the Piglit mailing list