diff options
Diffstat (limited to 'xlators/performance')
| -rw-r--r-- | xlators/performance/stat-prefetch/src/stat-prefetch.c | 3 | ||||
| -rw-r--r-- | xlators/performance/write-behind/src/write-behind.c | 3 | 
2 files changed, 5 insertions, 1 deletions
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: diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index 8a4be0f7f99..42fc0bb7e28 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -3009,6 +3009,9 @@ fini (xlator_t *this)  {          wb_conf_t *conf = this->private; +        if (!conf) +                return; +        this->private = NULL;          GF_FREE (conf);          return;  }  | 
