diff options
author | J. Bruce Fields <bfields@redhat.com> | 2016-04-29 17:35:45 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2016-05-03 21:32:50 +0200 |
commit | 64c59a3726f2dfa71680f9f3c34359e10e3ed7ab (patch) | |
tree | 2621314076adecd7e96dc89d89b4bcfde507803c /net | |
parent | Linux 4.6-rc5 (diff) | |
download | linux-64c59a3726f2dfa71680f9f3c34359e10e3ed7ab.tar.xz linux-64c59a3726f2dfa71680f9f3c34359e10e3ed7ab.zip |
Remove unnecessary allocation
Reported-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 1095be9c80ab..22886097d8ee 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -569,10 +569,9 @@ gss_svc_searchbyctx(struct cache_detail *cd, struct xdr_netobj *handle) struct rsc *found; memset(&rsci, 0, sizeof(rsci)); - if (dup_to_netobj(&rsci.handle, handle->data, handle->len)) - return NULL; + rsci.handle.data = handle->data; + rsci.handle.len = handle->len; found = rsc_lookup(cd, &rsci); - rsc_free(&rsci); if (!found) return NULL; if (cache_check(cd, &found->h, NULL)) |