]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
nfsd: use kmem_cache_free() instead of kfree()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 9 Apr 2013 06:15:31 +0000 (14:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2013 03:33:13 +0000 (20:33 -0700)
commit 2c44a23471d048118e49b616d08df0729cdbd9f1 upstream.

memory allocated by kmem_cache_alloc() should be freed using
kmem_cache_free(), not kfree().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4state.c

index a0986ce661cea71e6cb76ab82c87f18d0ff5ab13..f9a5e62b7683cdbc491057aab3b7825e4253f892 100644 (file)
@@ -261,7 +261,7 @@ kmem_cache *slab)
                min_stateid = 0;
        return stid;
 out_free:
-       kfree(stid);
+       kmem_cache_free(slab, stid);
        return NULL;
 }