Skip to content

Commit

Permalink
nbd: don't leak nbd_config
Browse files Browse the repository at this point in the history
nbd_config is allocated in nbd_alloc_config(), but never freed.

Fixes: 5ea8d10 ("nbd: separate out the config information")
Signed-off-by: Ilya Dryomov <[email protected]>
Reviewed-by: Josef Bacik <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
idryomov authored and axboe committed May 30, 2017
1 parent af622b8 commit fa97653
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/block/nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,7 @@ static void nbd_config_put(struct nbd_device *nbd)
}
kfree(config->socks);
}
kfree(nbd->config);
nbd->config = NULL;

nbd->tag_set.timeout = 0;
Expand Down

0 comments on commit fa97653

Please sign in to comment.