Remove unnecessary allocation
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 29 Apr 2016 15:35:45 +0000 (11:35 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 3 May 2016 19:32:50 +0000 (15:32 -0400)
Reported-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/auth_gss/svcauth_gss.c

index 1095be9c80ab809900d2bf0afbde9c63b6034a9d..22886097d8ee7cc745d0a4e667b3f5a346758bb5 100644 (file)
@@ -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))