Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97bb59a0 authored by Alex Elder's avatar Alex Elder Committed by Sage Weil
Browse files

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: default avatarAlex Elder <elder@dreamhost.com>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent d8fb02ab
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);