diff options
author | shishir gowda <shishirng@gluster.com> | 2010-10-07 03:20:59 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-10-08 04:29:00 -0700 |
commit | 98e1ea0f178bdb8d26037edda9aae7bc2339bac4 (patch) | |
tree | c560211236cbc90f37a2682c5ff7da6285ae0744 /xlators/performance/stat-prefetch/src/stat-prefetch.c | |
parent | d4b0360c8c4c5dab692f827972ccea0e728af688 (diff) |
Possible race condition between cleanup and dereferencing
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1760 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1760
Diffstat (limited to 'xlators/performance/stat-prefetch/src/stat-prefetch.c')
-rw-r--r-- | xlators/performance/stat-prefetch/src/stat-prefetch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c index 972afe313..0a984908f 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: |