bcache: Fix a minor memory leak on device teardown

Reported-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Kent Overstreet <koverstreet@google.com>
This commit is contained in:
Kent Overstreet 2013-04-05 13:46:13 -07:00
parent 7b41b51a70
commit 8ef747909c
1 changed files with 3 additions and 1 deletions

View File

@ -64,9 +64,11 @@ struct workqueue_struct *bcache_wq;
static void bio_split_pool_free(struct bio_split_pool *p)
{
if (p->bio_split_hook)
mempool_destroy(p->bio_split_hook);
if (p->bio_split)
bioset_free(p->bio_split);
}
static int bio_split_pool_init(struct bio_split_pool *p)