svga: Prevent use after free.

Courtesy of clang static analyzer.

I was hunting for potential sources of memory corruption using Mesa with
a GL trace, and happened to find this (unrelated) issue.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
Jose Fonseca 2018-01-22 15:05:22 +00:00
parent 60f15477da
commit dcbb224c68
1 changed files with 1 additions and 0 deletions

View File

@ -327,6 +327,7 @@ cleanup:
util_bitmask_destroy(svga->stream_output_id_bm);
util_bitmask_destroy(svga->query_id_bm);
FREE(svga);
svga = NULL;
done:
SVGA_STATS_TIME_POP(svgascreen->sws);