radeong: fix leaks
authorJoakim Sindholt <opensource@zhasha.com>
Sun, 26 Sep 2010 17:39:05 +0000 (19:39 +0200)
committerJoakim Sindholt <opensource@zhasha.com>
Sun, 26 Sep 2010 17:39:05 +0000 (19:39 +0200)
src/gallium/winsys/radeon/drm/radeon_r300.c

index 584009864215ef86dea769b934bc81255cbd339d..420522f5c1f355728b032f8f6cf2b2469e306b52 100644 (file)
@@ -250,6 +250,7 @@ static void radeon_r300_winsys_cs_destroy(struct r300_winsys_cs *rcs)
 {
     struct radeon_libdrm_cs *cs = radeon_libdrm_cs(rcs);
     radeon_cs_destroy(cs->cs);
+    FREE(cs);
 }
 
 static void radeon_winsys_destroy(struct r300_winsys_screen *rws)
@@ -261,6 +262,8 @@ static void radeon_winsys_destroy(struct r300_winsys_screen *rws)
 
     radeon_bo_manager_gem_dtor(ws->bom);
     radeon_cs_manager_gem_dtor(ws->csm);
+
+    FREE(rws);
 }
 
 boolean radeon_setup_winsys(int fd, struct radeon_libdrm_winsys* ws)