From ff5170faa131b201bf8170601dbeae18b400542f Mon Sep 17 00:00:00 2001 From: Harshavardhana Ranganath Date: Thu, 17 Dec 2009 15:41:21 +0000 Subject: Added null checks in "fini" Signed-off-by: Harshavardhana Signed-off-by: Vijay Bellur BUG: 364 (Segfault in io-cache) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=364 --- xlators/performance/read-ahead/src/read-ahead.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/performance/read-ahead') 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); -- cgit