Staging: ramzswap: Free memory when create_device is failed
authorMinchan Kim <minchan.kim@gmail.com>
Mon, 11 Jan 2010 07:15:53 +0000 (16:15 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 4 Mar 2010 00:42:42 +0000 (16:42 -0800)
commit3bf040c75294ad9470b11902477e2c07af2031bd
tree39c21380af91c3cbb7e111a35577cb6d54390830
parentb76a32638d9d7d6b421fccce02e667007509bd7b
Staging: ramzswap: Free memory when create_device is failed

If create_device is failed, it can't free gendisk and request_queue of
preceding devices. It cause memory leak.

This patch fixes it.

Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/ramzswap/ramzswap_drv.c