drm/nouveau/nouveau: fix memory leak in nouveau_crtc_page_flip()

Fix a memory leak in the nouveau_crtc_page_flip() error handling path.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Christian Engelmayer 2013-12-29 23:08:54 +01:00 committed by Ben Skeggs
parent 5d2f4767c4
commit bbc6319676

View file

@ -610,7 +610,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
ret = nouveau_fence_sync(fence, chan);
nouveau_fence_unref(&fence);
if (ret)
return ret;
goto fail_free;
if (new_bo != old_bo) {
ret = nouveau_bo_pin(new_bo, TTM_PL_FLAG_VRAM);