From b10041bbe73049d4a3af3027554729737c5b43af Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Sun, 10 Jun 2007 06:40:45 +0000 Subject: [PATCH] STABLE14-linux-kmem-destroy-fix-20070609 don't destroy if create failed (cherry picked from commit 18484f0fc64a550c1abacb6d2614c7ea12af4052) --- src/afs/LINUX/osi_vfsops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c index f8ec546bd..c5501db3e 100644 --- a/src/afs/LINUX/osi_vfsops.c +++ b/src/afs/LINUX/osi_vfsops.c @@ -316,7 +316,8 @@ afs_init_inodecache(void) void afs_destroy_inodecache(void) { - (void) kmem_cache_destroy(afs_inode_cachep); + if (afs_inode_cachep) + (void) kmem_cache_destroy(afs_inode_cachep); } #else int -- 2.39.5