summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorIraj Jamali <ijamali@redhat.com>2018-10-04 14:22:23 +0530
committerNiels de Vos <ndevos@redhat.com>2018-10-10 10:18:32 +0000
commit4da0d93f8703c7247fece9d9fb471742e6fd7c33 (patch)
tree740b186a7025d66e170e08a751a6fc7cf84744cb /libglusterfs/src
parent6472b43cfdb7454f1c1f1faf57ff13643d62fad7 (diff)
libglusterfs: NULL pointer dereferencing clang fix
Avoided NULL pointer dereferencing by doing GF_VALIDATE_OR_GOTO for rvec Updates: bz#1622665 Change-Id: I650e0203796dd705d79060f9506fc6c559b30f56 Signed-off-by: Iraj Jamali <ijamali@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/rot-buffs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/rot-buffs.c b/libglusterfs/src/rot-buffs.c
index c5147321c60..560d9f9805e 100644
--- a/libglusterfs/src/rot-buffs.c
+++ b/libglusterfs/src/rot-buffs.c
@@ -96,8 +96,11 @@ rvec_in_watermark_range(rbuf_list_t *rlist)
static void
rbuf_reset_rvec(rbuf_iovec_t *rvec)
{
+ GF_VALIDATE_OR_GOTO("libglusterfs", rvec, err);
/* iov_base is _never_ modified */
rvec->iov.iov_len = 0;
+err:
+ return;
}
/* TODO: alloc multiple rbuf_iovec_t */