summaryrefslogtreecommitdiffstats
path: root/block/badblocks.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/badblocks.c')
-rw-r--r--block/badblocks.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/badblocks.c b/block/badblocks.c
index fabf6b64c2d1..37e5c0a2ef69 100644
--- a/block/badblocks.c
+++ b/block/badblocks.c
@@ -555,6 +555,8 @@ EXPORT_SYMBOL_GPL(badblocks_init);
*/
void badblocks_exit(struct badblocks *bb)
{
+ if (!bb)
+ return;
kfree(bb->page);
bb->page = NULL;
}