[Mesa-dev] [PATCH] swr: Fix resource leak in object.
robert.foss at collabora.com
robert.foss at collabora.com
Tue May 3 22:45:00 UTC 2016
From: Robert Foss <robert.foss at collabora.com>
Make sure that memory allocated is free'd.
Previously only the contents of the variable
galliumvm was free'd, not the actual memory
it points to.
Coverity: 1358907
Signed-off-by: Robert Foss <robert.foss at collabora.com>
---
src/gallium/drivers/swr/swr_shader.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/gallium/drivers/swr/swr_shader.cpp b/src/gallium/drivers/swr/swr_shader.cpp
index f693f51..5b1b1ee 100644
--- a/src/gallium/drivers/swr/swr_shader.cpp
+++ b/src/gallium/drivers/swr/swr_shader.cpp
@@ -134,6 +134,7 @@ struct BuilderSWR : public Builder {
~BuilderSWR() {
gallivm_free_ir(gallivm);
+ FREE(gallivm);
}
struct gallivm_state *gallivm;
--
2.5.0
More information about the mesa-dev
mailing list