r300g: plug a memory leak in winsys
authorMarek Olšák <maraeo@gmail.com>
Fri, 11 Feb 2011 01:34:15 +0000 (02:34 +0100)
committerMarek Olšák <maraeo@gmail.com>
Fri, 11 Feb 2011 01:34:15 +0000 (02:34 +0100)
src/gallium/winsys/radeon/drm/radeon_drm_bo.c

index f6a013ef6885317bf61feda3ab2302fca75f53b2..0cd9270c6dcb0c1c16ad638b98816ff135fa2753 100644 (file)
@@ -463,6 +463,7 @@ static struct r300_winsys_bo *radeon_winsys_bo_from_handle(struct r300_winsys_sc
     /* Open the BO. */
     open_arg.name = whandle->handle;
     if (drmIoctl(ws->fd, DRM_IOCTL_GEM_OPEN, &open_arg)) {
+        FREE(bo);
         goto fail;
     }
     bo->handle = open_arg.handle;