From b21f3b3ce69c6b1b0eb6f8243b5c601c5c4b7cbe Mon Sep 17 00:00:00 2001 From: arao Date: Thu, 12 Feb 2015 10:22:42 +0530 Subject: features/marker: Fixing dereference after null check CID: 1124494 The variable was sent as a parameter to the function without the null check, hence added a check on null and error log accordingly. Change-Id: I11a649fc9a1bedad17422aeddb8dd8fa225d404e BUG: 789278 Signed-off-by: arao Reviewed-on: http://review.gluster.org/9641 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Kaleb KEITHLEY --- xlators/features/marker/src/marker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index e8a8eeab6e4..fbe640f0feb 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -459,7 +459,7 @@ marker_specific_setxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } } - ret = marker_trav_parent (local); + ret = (local) ? marker_trav_parent (local) : -1; if (ret == -1) { gf_log (this->name, GF_LOG_DEBUG, "Error occurred " -- cgit