Skip to content

Commit fa97653

Browse files
idryomovaxboe
authored andcommitted
nbd: don't leak nbd_config
nbd_config is allocated in nbd_alloc_config(), but never freed. Fixes: 5ea8d10 ("nbd: separate out the config information") Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent af622b8 commit fa97653

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/block/nbd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,7 @@ static void nbd_config_put(struct nbd_device *nbd)
10211021
}
10221022
kfree(config->socks);
10231023
}
1024+
kfree(nbd->config);
10241025
nbd->config = NULL;
10251026

10261027
nbd->tag_set.timeout = 0;

0 commit comments

Comments
 (0)