Merge branch 'linux-4.15' of git://github.com/skeggsb/linux into drm-fixes
authorDave Airlie <airlied@redhat.com>
Thu, 21 Dec 2017 01:06:55 +0000 (11:06 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 21 Dec 2017 01:06:55 +0000 (11:06 +1000)
nouveau memleak fix

* 'linux-4.15' of git://github.com/skeggsb/linux:
  drm/nouveau: fix obvious memory leak

drivers/gpu/drm/nouveau/nouveau_vmm.c

index 9e2628d..f5371d9 100644 (file)
@@ -67,8 +67,8 @@ nouveau_vma_del(struct nouveau_vma **pvma)
                        nvif_vmm_put(&vma->vmm->vmm, &tmp);
                }
                list_del(&vma->head);
-               *pvma = NULL;
                kfree(*pvma);
+               *pvma = NULL;
        }
 }