summaryrefslogtreecommitdiff
path: root/src/radeon_vbo.c
diff options
context:
space:
mode:
authorThomas DeRensis <tderensis@gmail.com>2014-09-04 21:45:19 -0400
committerMichel Dänzer <michel.daenzer@amd.com>2014-09-05 12:21:20 +0900
commitb9a9b244336ed50d7df4f36135f875a3bb6ca948 (patch)
tree9eda68071757e291d599de4f8de890bb8637647d /src/radeon_vbo.c
parentba5fcc4d6b6eae3f2c55c6229a53d24d160789c1 (diff)
radeon: fix a leak in radeon_vbo_get_bo()
The dma_bo struct was never freed in the error path. Reported by cppcheck. Signed-off-by: Thomas DeRensis <tderensis@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src/radeon_vbo.c')
-rw-r--r--src/radeon_vbo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/radeon_vbo.c b/src/radeon_vbo.c
index 1924772f..6b0d278a 100644
--- a/src/radeon_vbo.c
+++ b/src/radeon_vbo.c
@@ -185,6 +185,7 @@ again_alloc:
if (!dma_bo->bo) {
ErrorF("failure to allocate DMA BO\n");
+ free(dma_bo);
return NULL;
}
insert_at_head(&accel_state->bo_reserved, dma_bo);