diff options
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 4c4146350236..dcd673186944 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -151,8 +151,7 @@ static u32 *read_buf(struct nfsd4_compoundargs *argp, int nbytes) | |||
151 | if (nbytes <= sizeof(argp->tmp)) | 151 | if (nbytes <= sizeof(argp->tmp)) |
152 | p = argp->tmp; | 152 | p = argp->tmp; |
153 | else { | 153 | else { |
154 | if (argp->tmpp) | 154 | kfree(argp->tmpp); |
155 | kfree(argp->tmpp); | ||
156 | p = argp->tmpp = kmalloc(nbytes, GFP_KERNEL); | 155 | p = argp->tmpp = kmalloc(nbytes, GFP_KERNEL); |
157 | if (!p) | 156 | if (!p) |
158 | return NULL; | 157 | return NULL; |
@@ -2476,10 +2475,8 @@ void nfsd4_release_compoundargs(struct nfsd4_compoundargs *args) | |||
2476 | kfree(args->ops); | 2475 | kfree(args->ops); |
2477 | args->ops = args->iops; | 2476 | args->ops = args->iops; |
2478 | } | 2477 | } |
2479 | if (args->tmpp) { | 2478 | kfree(args->tmpp); |
2480 | kfree(args->tmpp); | 2479 | args->tmpp = NULL; |
2481 | args->tmpp = NULL; | ||
2482 | } | ||
2483 | while (args->to_free) { | 2480 | while (args->to_free) { |
2484 | struct tmpbuf *tb = args->to_free; | 2481 | struct tmpbuf *tb = args->to_free; |
2485 | args->to_free = tb->next; | 2482 | args->to_free = tb->next; |