Skip to content

Commit

Permalink
bcache: Fix a minor memory leak on device teardown
Browse files Browse the repository at this point in the history
Reported-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Kent Overstreet <koverstreet@google.com>
  • Loading branch information
Kent Overstreet committed Apr 8, 2013
1 parent 7b41b51 commit 8ef7479
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/md/bcache/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8ef7479

Please sign in to comment.