zram: destroy all devices on error recovery path in zram_init()
(cherry pick from commit 39a9b8ac9333e4268ecff7da6c9d1ab3823ff243) On error recovery path of zram_init(), it leaks the zram device object causing the failure. So change create_device() to free allocated resources on error path. Signed-off-by:Jiang Liu <jiang.liu@huawei.com> Acked-by:
Minchan Kim <minchan@kernel.org> Acked-by:
Jerome Marchand <jmarchan@redhat.com> Cc: stable@vger.kernel.org Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Bug: 24810447 Change-Id: Ifb794f34d4e999ebd35b89aa2f3eeca8fd696ce8
Loading
Please register or sign in to comment