From 5f73c75c60841d8173f896b80432286c6458d853 Mon Sep 17 00:00:00 2001 From: Harshavardhana Ranganath Date: Thu, 17 Dec 2009 15:43:34 +0000 Subject: Add null pointer checks in "fini" Signed-off-by: Harshavardhana Signed-off-by: Anand V. Avati BUG: 364 (Segfault in io-cache) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=364 --- xlators/performance/io-cache/src/io-cache.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/performance/io-cache/src/io-cache.c') diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index ba170c338..c3f76b3bd 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -1198,6 +1198,9 @@ fini (xlator_t *this) { ioc_table_t *table = this->private; + if (table == NULL) + return; + pthread_mutex_destroy (&table->table_lock); FREE (table); -- cgit