From: Sage Weil <sage@newdream.net>
Date: Mon, 5 Jul 2010 22:36:49 +0000 (-0700)
Subject: ceph: fix leak of mon authorizer
X-Git-Tag: firefly_0821_release~9833^2~1386^2~6
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=22b1de06c9fe128ca3de72560c3e8c2cabf2927a;p=firefly-linux-kernel-4.4.55.git

ceph: fix leak of mon authorizer

Fix leak of a struct ceph_buffer on umount.

Signed-off-by: Sage Weil <sage@newdream.net>
---

diff --git a/fs/ceph/auth_x.c b/fs/ceph/auth_x.c
index 3fe49042d8ad..6d44053ecff1 100644
--- a/fs/ceph/auth_x.c
+++ b/fs/ceph/auth_x.c
@@ -613,6 +613,9 @@ static void ceph_x_destroy(struct ceph_auth_client *ac)
 		remove_ticket_handler(ac, th);
 	}
 
+	if (xi->auth_authorizer.buf)
+		ceph_buffer_put(xi->auth_authorizer.buf);
+
 	kfree(ac->private);
 	ac->private = NULL;
 }