From 98e1ea0f178bdb8d26037edda9aae7bc2339bac4 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Thu, 7 Oct 2010 03:20:59 +0000 Subject: Possible race condition between cleanup and dereferencing Signed-off-by: shishir gowda Signed-off-by: Vijay Bellur BUG: 1760 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1760 --- xlators/performance/stat-prefetch/src/stat-prefetch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/performance/stat-prefetch/src') diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c index 972afe313f2..0a984908fdc 100644 --- a/xlators/performance/stat-prefetch/src/stat-prefetch.c +++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c @@ -777,7 +777,7 @@ sp_cache_add_entries (sp_cache_t *cache, gf_dirent_t *entries) sp_private_t *priv = NULL; this = cache->this; - if (this) + if (this && this->private) priv = this->private; LOCK (&cache->lock); @@ -3676,6 +3676,7 @@ fini (xlator_t *this) mem_pool_destroy (priv->mem_pool); LOCK_DESTROY (&priv->lock); GF_FREE (priv); + this->private = NULL; } } out: -- cgit