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

Commit 87ed1d65 authored by Jeff Layton's avatar Jeff Layton Committed by Steve French
Browse files

[CIFS] Add destroy routine for dns_resolver



Otherwise, we're leaking the payload memory.

CC: Stable Kernel <stable@vger.kernel.org>
Acked-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 96c2a113
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -8,7 +8,8 @@ architectures. Fix problems with preserving timestamps on copying open
files (e.g. "cp -a") to Windows servers.  For mkdir and create honor setgid bit
on parent directory when server supports Unix Extensions but not POSIX
create. Update cifs.upcall version to handle new Kerberos sec flags
(this requires update of cifs.upcall program from Samba).
(this requires update of cifs.upcall program from Samba).  Fix memory leak
on dns_upcall (resolving DFS referralls).

Version 1.53
------------
+7 −0
Original line number Diff line number Diff line
@@ -47,11 +47,18 @@ static int dns_resolver_instantiate(struct key *key, const void *data,
	return rc;
}

static void
dns_resolver_destroy(struct key *key)
{
	kfree(key->payload.data);
}

struct key_type key_type_dns_resolver = {
	.name        = "dns_resolver",
	.def_datalen = sizeof(struct in_addr),
	.describe    = user_describe,
	.instantiate = dns_resolver_instantiate,
	.destroy     = dns_resolver_destroy,
	.match       = user_match,
};