Explorar el Código

[PATCH] aoe 5/12: don't try to free null bufpool

don't try to free null bufpool

Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ecashin@coraid.com hace 20 años
padre
commit
03347936af
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      drivers/block/aoe/aoedev.c

+ 2 - 1
drivers/block/aoe/aoedev.c

@@ -146,7 +146,8 @@ aoedev_freedev(struct aoedev *d)
 		put_disk(d->gd);
 	}
 	kfree(d->frames);
-	mempool_destroy(d->bufpool);
+	if (d->bufpool)
+		mempool_destroy(d->bufpool);
 	kfree(d);
 }