summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2018-10-25 19:48:37 +0530
committerAmar Tumballi <amarts@redhat.com>2018-10-26 02:54:55 +0000
commitbf5bfa5f2fcd1a73078c289aeac715bd82c366ed (patch)
tree20daf109ed43f0ed0228c15f338e23babd57b73b /libglusterfs/src
parentace454cf407753625acc2d4d090cb529bd13b183 (diff)
statedump: fix clang null dereference error
ctx->active can be null, and is checked elsewhere in the same function. In another case, where 'ctx->active' gets dereferenced, it needs to be validated before the loop is hit. Updates: bz#1622665 Change-Id: I4ec917e96c0756586fc7a74c76848bb9589a0293 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/statedump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfs/src/statedump.c b/libglusterfs/src/statedump.c
index 422fb05ede6..be928a375d8 100644
--- a/libglusterfs/src/statedump.c
+++ b/libglusterfs/src/statedump.c
@@ -808,7 +808,7 @@ gf_proc_dump_info(int signum, glusterfs_ctx_t *ctx)
if (!ctx)
goto out;
- if (ctx) {
+ if (ctx && ctx->active) {
top = ctx->active->first;
for (trav_p = &top->children; *trav_p; trav_p = &(*trav_p)->next) {
brick_count++;