diff mbox

drm/nouveau: fix a memory leak.

Message ID 51BC2B7A.5030009@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

majianpeng June 15, 2013, 8:53 a.m. UTC
When cleanup extra stat if this object was a notifier,it should free the
notifier.

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
  drivers/gpu/drm/nouveau/nouveau_abi16.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c 
b/drivers/gpu/drm/nouveau/nouveau_abi16.c
index 1c4c6c9..b5252ff 100644
--- a/drivers/gpu/drm/nouveau/nouveau_abi16.c
+++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c
@@ -483,8 +483,7 @@  nouveau_abi16_ioctl_gpuobj_free(ABI16_IOCTL_ARGS)
      /* cleanup extra state if this object was a notifier */
      list_for_each_entry(ntfy, &chan->notifiers, head) {
          if (ntfy->handle == fini->handle) {
-            nouveau_mm_free(&chan->heap, &ntfy->node);
-            list_del(&ntfy->head);
+            nouveau_abi16_ntfy_fini(chan, ntfy);
              break;
          }
      }