Skip to content

Commit

Permalink
nfsd: use kmem_cache_free() instead of kfree()
Browse files Browse the repository at this point in the history
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>
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
Wei Yongjun authored and J. Bruce Fields committed Apr 9, 2013
1 parent 9411b1d commit 2c44a23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
@@ -364,7 +364,7 @@ kmem_cache *slab)
min_stateid = 0;
return stid;
out_free:
kfree(stid);
kmem_cache_free(slab, stid);
return NULL;
}

0 comments on commit 2c44a23

Please sign in to comment.