diff options
author | Vinson Lee <[email protected]> | 2010-08-25 11:22:55 -0700 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2010-08-25 11:22:55 -0700 |
commit | 721954c334787bbddd8726348a4c95465f89677b (patch) | |
tree | e7d263ee51918cab197a2f162832c210d39ed266 /src/gallium/drivers/nvfx/nvfx_fragprog.c | |
parent | dc27515780d5e1b3a7b3f9ab7119d3e35b22294c (diff) |
nvfx: Set pointer to NULL after free.
Guard against potential use after free.
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_fragprog.c')
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_fragprog.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_fragprog.c b/src/gallium/drivers/nvfx/nvfx_fragprog.c index 7f6b3f6599e..275672a31fa 100644 --- a/src/gallium/drivers/nvfx/nvfx_fragprog.c +++ b/src/gallium/drivers/nvfx/nvfx_fragprog.c @@ -996,8 +996,10 @@ nvfx_fragprog_prepare(struct nvfx_context* nvfx, struct nvfx_fpc *fpc) return TRUE; out_err: - if (fpc->r_temp) + if (fpc->r_temp) { FREE(fpc->r_temp); + fpc->r_temp = NULL; + } tgsi_parse_free(&p); return FALSE; } |