[Mesa-dev] [PATCH 3/3] radv/winsys: Fix mem leak at failed do_winsys_init() call site
Edward O'Callaghan
funfunctor at folklore1984.net
Tue Oct 11 09:04:49 UTC 2016
Probably unlikely however ensure we don't leak a heap allocation
on the fail path.
Signed-off-by: Edward O'Callaghan <funfunctor at folklore1984.net>
---
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
index 0ce44ac..ded5ed7 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
@@ -356,5 +356,6 @@ radv_amdgpu_winsys_create(int fd)
return &ws->base;
fail:
+ free(ws);
return NULL;
}
--
2.7.4
More information about the mesa-dev
mailing list