]> www.infradead.org Git - users/willy/xarray.git/commit
zram: free secondary algorithms names
authorSergey Senozhatsky <senozhatsky@chromium.org>
Wed, 11 Sep 2024 02:54:56 +0000 (11:54 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 17 Sep 2024 08:07:01 +0000 (01:07 -0700)
commit684826f8271ad97580b138b9ffd462005e470b99
treed528a63dc09e5d46eb3dbadc8f72804f25cf5403
parent2abbcc099ec60844ca7c15214ab12955d3c11e68
zram: free secondary algorithms names

We need to kfree() secondary algorithms names when reset zram device that
had multi-streams, otherwise we leak memory.

[senozhatsky@chromium.org: kfree(NULL) is legal]
Link: https://lkml.kernel.org/r/20240917013021.868769-1-senozhatsky@chromium.org
Link: https://lkml.kernel.org/r/20240911025600.3681789-1-senozhatsky@chromium.org
Fixes: 001d92735701 ("zram: add recompression algorithm sysfs knob")
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/zram/zram_drv.c