forked from luck/tmp_suning_uos_patched
rbd: fix a memory leak in rbd_get_client()
If an existing rbd client is found to be suitable for use in rbd_get_client(), the rbd_options structure is not being freed as it should. Fix that. Signed-off-by: Alex Elder <elder@dreamhost.com> Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
d8fb02abdc
commit
97bb59a03d
@ -380,6 +380,7 @@ static int rbd_get_client(struct rbd_device *rbd_dev, const char *mon_addr,
|
||||
rbdc = __rbd_client_find(opt);
|
||||
if (rbdc) {
|
||||
ceph_destroy_options(opt);
|
||||
kfree(rbd_opts);
|
||||
|
||||
/* using an existing client */
|
||||
kref_get(&rbdc->kref);
|
||||
|
Loading…
Reference in New Issue
Block a user