From: J. Bruce Fields Date: Fri, 29 Apr 2016 15:35:45 +0000 (-0400) Subject: Remove unnecessary allocation X-Git-Tag: v4.7-rc1~62^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64c59a3726f2dfa71680f9f3c34359e10e3ed7ab;p=platform%2Fkernel%2Flinux-exynos.git Remove unnecessary allocation Reported-by: Benjamin Coddington Signed-off-by: J. Bruce Fields --- diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 1095be9..2288609 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))