summaryrefslogtreecommitdiffstats
path: root/xlators/performance/read-ahead/src/read-ahead.c
diff options
context:
space:
mode:
authorHarshavardhana Ranganath <harsha@gluster.com>2009-12-17 15:41:21 +0000
committerVijay Bellur <vijay@dev.gluster.com>2009-12-18 08:41:29 -0800
commitff5170faa131b201bf8170601dbeae18b400542f (patch)
treed8aa89f66b642036d5ce6ad62a0bdb566e61ac16 /xlators/performance/read-ahead/src/read-ahead.c
parentcfe095763c4ec59026467e3b76a92c61c18f0792 (diff)
Added null checks in "fini"
Signed-off-by: Harshavardhana <harsha@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 364 (Segfault in io-cache) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=364
Diffstat (limited to 'xlators/performance/read-ahead/src/read-ahead.c')
-rw-r--r--xlators/performance/read-ahead/src/read-ahead.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c
index da9715c84..8e140d821 100644
--- a/xlators/performance/read-ahead/src/read-ahead.c
+++ b/xlators/performance/read-ahead/src/read-ahead.c
@@ -921,6 +921,9 @@ fini (xlator_t *this)
{
ra_conf_t *conf = this->private;
+ if (conf == NULL)
+ return;
+
pthread_mutex_destroy (&conf->conf_lock);
FREE (conf);