nvfx: Set pointer to NULL after free.

Guard against potential use after free.
This commit is contained in:
Vinson Lee 2010-08-25 11:22:55 -07:00
parent dc27515780
commit 721954c334

View file

@ -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;
}