diff options
author | Jeff Layton <jlayton@redhat.com> | 2008-08-27 17:53:30 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-08-27 21:17:41 +0000 |
commit | 87ed1d65fb536a0cd4e84874c0b038f953e448aa (patch) | |
tree | c6af45a3605a037a5f53101107da5e4cd4024325 /fs/cifs | |
parent | 96c2a1137b9e00bcdbe3a95113ea8f42ca994f76 (diff) | |
download | blackbird-op-linux-87ed1d65fb536a0cd4e84874c0b038f953e448aa.tar.gz blackbird-op-linux-87ed1d65fb536a0cd4e84874c0b038f953e448aa.zip |
[CIFS] Add destroy routine for dns_resolver
Otherwise, we're leaking the payload memory.
CC: Stable Kernel <stable@vger.kernel.org>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/CHANGES | 3 | ||||
-rw-r--r-- | fs/cifs/dns_resolve.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index 526041a52d35..f9e4ad97a79e 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES @@ -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 ------------ diff --git a/fs/cifs/dns_resolve.c b/fs/cifs/dns_resolve.c index f730ef35499e..a2e0673e1b08 100644 --- a/fs/cifs/dns_resolve.c +++ b/fs/cifs/dns_resolve.c @@ -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, }; |