From 320455bddfbadcfbe1b173b0de54b3b25bf228f7 Mon Sep 17 00:00:00 2001 From: arao Date: Wed, 11 Feb 2015 18:58:08 +0530 Subject: io-stats: Fixing dereference after null check. CID: 1124492 If 'this' pointer fails to exist then the component is hard-coded in the gf_log if not it is dereferenced. Change-Id: I988137d4f5ac4c9aedef7cef0c75b167a8a5c59f BUG: 789278 Signed-off-by: arao Reviewed-on: http://review.gluster.org/9639 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/debug/io-stats/src/io-stats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/debug') diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c index 7acc3803107..f79db1ad19a 100644 --- a/xlators/debug/io-stats/src/io-stats.c +++ b/xlators/debug/io-stats/src/io-stats.c @@ -2799,7 +2799,8 @@ reconfigure (xlator_t *this, dict_t *options) ret = 0; out: - gf_log (this->name, GF_LOG_DEBUG, "reconfigure returning %d", ret); + gf_log (this ? this->name : "io-stats", + GF_LOG_DEBUG, "reconfigure returning %d", ret); return ret; } -- cgit