diff options
author | Rob Clark <rob@ti.com> | 2012-10-16 14:51:15 -0500 |
---|---|---|
committer | Rob Clark <rob@ti.com> | 2012-10-16 14:51:28 -0500 |
commit | 653ccadb38c87be565df3fbf2ff24a0cbe5a5e98 (patch) | |
tree | 911217b7d4fc302a4329923de767eff342f0f8cf | |
parent | 6e6bf26bc08bf9c798489eb4a77efc7dbde966dd (diff) |
dri2: fix some leaks
Signed-off-by: Rob Clark <rob@ti.com>
-rw-r--r-- | src/omap_dri2.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/omap_dri2.c b/src/omap_dri2.c index 6c90f27..7928332 100644 --- a/src/omap_dri2.c +++ b/src/omap_dri2.c @@ -66,6 +66,8 @@ typedef struct { #define OMAPBUF(p) ((OMAPDRI2BufferPtr)(p)) #define DRIBUF(p) ((DRI2BufferPtr)(&(p)->base)) +static void OMAPDRI2DestroyBuffer(DrawablePtr pDraw, DRI2BufferPtr buffer); + /* ************************************************************************* */ /** @@ -279,7 +281,7 @@ OMAPDRI2CreateBuffer(DrawablePtr pDraw, unsigned int attachment, ret = omap_bo_get_name(bo, &DRIBUF(buf)->name); if (ret) { ERROR_MSG("could not get buffer name: %d", ret); - /* TODO cleanup */ + OMAPDRI2DestroyBuffer(pDraw, DRIBUF(buf)); return NULL; } @@ -454,6 +456,7 @@ OMAPDRI2SwapDispatch(DrawablePtr pDraw, OMAPDRISwapCmd *cmd) RegionInit(®ion, &box, 0); OMAPDRI2CopyRegion(pDraw, ®ion, cmd->pDstBuffer, cmd->pSrcBuffer); + RegionUninit(®ion); cmd->type = DRI2_BLIT_COMPLETE; } |