Commit 721954c3 authored by Vinson Lee's avatar Vinson Lee
Browse files

nvfx: Set pointer to NULL after free.

Guard against potential use after free.
parent dc275157
...@@ -996,8 +996,10 @@ nvfx_fragprog_prepare(struct nvfx_context* nvfx, struct nvfx_fpc *fpc) ...@@ -996,8 +996,10 @@ nvfx_fragprog_prepare(struct nvfx_context* nvfx, struct nvfx_fpc *fpc)
return TRUE; return TRUE;
out_err: out_err:
if (fpc->r_temp) if (fpc->r_temp) {
FREE(fpc->r_temp); FREE(fpc->r_temp);
fpc->r_temp = NULL;
}
tgsi_parse_free(&p); tgsi_parse_free(&p);
return FALSE; return FALSE;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment