Re: [PATCH] drm/tests: shmem: Fix memleak

2025-04-29 Thread Maxime Ripard
On Tue, 08 Apr 2025 16:07:58 +0200, Maxime Ripard wrote: > The drm_gem_shmem_test_get_pages_sgt() gets a scatter-gather table using > the drm_gem_shmem_get_sg_table() function and rightfully calls > sg_free_table() on it. However, it's also supposed to kfree() the > returned sg_table, but doesn't.

Re: [PATCH] drm/tests: shmem: Fix memleak

2025-04-25 Thread Javier Martinez Canillas
Maxime Ripard writes: Hello Maxime, > The drm_gem_shmem_test_get_pages_sgt() gets a scatter-gather table using > the drm_gem_shmem_get_sg_table() function and rightfully calls > sg_free_table() on it. However, it's also supposed to kfree() the > returned sg_table, but doesn't. > > This leads to

[PATCH] drm/tests: shmem: Fix memleak

2025-04-08 Thread Maxime Ripard
The drm_gem_shmem_test_get_pages_sgt() gets a scatter-gather table using the drm_gem_shmem_get_sg_table() function and rightfully calls sg_free_table() on it. However, it's also supposed to kfree() the returned sg_table, but doesn't. This leads to a memory leak, reported by kmemleak. Fix it by add