diff options
author | arao <arao@redhat.com> | 2015-02-12 10:22:42 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-07-17 04:37:30 -0700 |
commit | b21f3b3ce69c6b1b0eb6f8243b5c601c5c4b7cbe (patch) | |
tree | 5f8aee3c13e8ab5deb3a0fd2d2b8aeb1d926f987 /xlators/features/marker | |
parent | ee824ccb10e28489907fbf978a2d36b0b2c5dc8c (diff) |
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 <arao@redhat.com>
Reviewed-on: http://review.gluster.org/9641
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'xlators/features/marker')
-rw-r--r-- | xlators/features/marker/src/marker.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 " |