Loading fs/nfsd/nfs4state.c +1 −2 Original line number Diff line number Diff line Loading @@ -986,12 +986,11 @@ static struct nfs4_client *alloc_client(struct xdr_netobj name) clp = kzalloc(sizeof(struct nfs4_client), GFP_KERNEL); if (clp == NULL) return NULL; clp->cl_name.data = kmalloc(name.len, GFP_KERNEL); clp->cl_name.data = kmemdup(name.data, name.len, GFP_KERNEL); if (clp->cl_name.data == NULL) { kfree(clp); return NULL; } memcpy(clp->cl_name.data, name.data, name.len); clp->cl_name.len = name.len; return clp; } Loading fs/nfsd/nfs4xdr.c +1 −2 Original line number Diff line number Diff line Loading @@ -215,10 +215,9 @@ defer_free(struct nfsd4_compoundargs *argp, static char *savemem(struct nfsd4_compoundargs *argp, __be32 *p, int nbytes) { if (p == argp->tmp) { p = kmalloc(nbytes, GFP_KERNEL); p = kmemdup(argp->tmp, nbytes, GFP_KERNEL); if (!p) return NULL; memcpy(p, argp->tmp, nbytes); } else { BUG_ON(p != argp->tmpp); argp->tmpp = NULL; Loading Loading
fs/nfsd/nfs4state.c +1 −2 Original line number Diff line number Diff line Loading @@ -986,12 +986,11 @@ static struct nfs4_client *alloc_client(struct xdr_netobj name) clp = kzalloc(sizeof(struct nfs4_client), GFP_KERNEL); if (clp == NULL) return NULL; clp->cl_name.data = kmalloc(name.len, GFP_KERNEL); clp->cl_name.data = kmemdup(name.data, name.len, GFP_KERNEL); if (clp->cl_name.data == NULL) { kfree(clp); return NULL; } memcpy(clp->cl_name.data, name.data, name.len); clp->cl_name.len = name.len; return clp; } Loading
fs/nfsd/nfs4xdr.c +1 −2 Original line number Diff line number Diff line Loading @@ -215,10 +215,9 @@ defer_free(struct nfsd4_compoundargs *argp, static char *savemem(struct nfsd4_compoundargs *argp, __be32 *p, int nbytes) { if (p == argp->tmp) { p = kmalloc(nbytes, GFP_KERNEL); p = kmemdup(argp->tmp, nbytes, GFP_KERNEL); if (!p) return NULL; memcpy(p, argp->tmp, nbytes); } else { BUG_ON(p != argp->tmpp); argp->tmpp = NULL; Loading