drm/amdgpu: fix memory leak in mes self test
authorjsg <jsg@openbsd.org>
Thu, 24 Aug 2023 06:01:11 +0000 (06:01 +0000)
committerjsg <jsg@openbsd.org>
Thu, 24 Aug 2023 06:01:11 +0000 (06:01 +0000)
From Jack Xiao
ce3288d8d654b252ba832626e7de481c195ef20a in linux-6.1.y/6.1.47
31d7c3a4fc3d312a0646990767647925d5bde540 in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.c

index d3558c3..296b2d5 100644 (file)
@@ -361,6 +361,8 @@ void amdgpu_ring_fini(struct amdgpu_ring *ring)
                amdgpu_bo_free_kernel(&ring->ring_obj,
                                      &ring->gpu_addr,
                                      (void **)&ring->ring);
+       } else {
+               kfree(ring->fence_drv.fences);
        }
 
        dma_fence_put(ring->vmid_wait);