Skip to content

Commit

Permalink
Remove unnecessary allocation
Browse files Browse the repository at this point in the history
Reported-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
J. Bruce Fields committed May 3, 2016
1 parent 02da2d7 commit 64c59a3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/sunrpc/auth_gss/svcauth_gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 64c59a3

Please sign in to comment.