[PATCH] aoe 5/12: don't try to free null bufpool
authorecashin@coraid.com <ecashin@coraid.com>
Tue, 19 Apr 2005 05:00:19 +0000 (22:00 -0700)
committerGreg KH <greg@press.kroah.org>
Tue, 19 Apr 2005 05:00:19 +0000 (22:00 -0700)
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>
drivers/block/aoe/aoedev.c

index a40a78a7f44a4ffabebbf45826cdf612cafab470..ec16c64dd114c37b30f2f97bb5e8f895c0a6e9bb 100644 (file)
@@ -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);
 }