glusterfs/0415-statedump-fix-clang-null-dereference-error.patch
Milind Changire b7dd6f45c1 autobuild v3.12.2-26
Resolves: bz#1479446 bz#1520882 bz#1579758 bz#1598407 bz#1599808
Resolves: bz#1603118 bz#1619357 bz#1622001 bz#1622308 bz#1631166
Resolves: bz#1631418 bz#1632563 bz#1634649 bz#1635071 bz#1635100
Resolves: bz#1635136 bz#1636291 bz#1638069 bz#1640347 bz#1642854
Resolves: bz#1643035 bz#1644120 bz#1644279 bz#1645916 bz#1647675
Signed-off-by: Milind Changire <mchangir@redhat.com>
2018-11-08 22:30:35 -05:00

40 lines
1.3 KiB
Diff

From a469cad3a6b7f340c6ac6fad7c2186299d675d70 Mon Sep 17 00:00:00 2001
From: Amar Tumballi <amarts@redhat.com>
Date: Mon, 5 Nov 2018 10:22:44 +0530
Subject: [PATCH 415/444] 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.
Upstream:
> URL: https://review.gluster.org/21493
BUG: 1643035
Change-Id: I799d92c8089ddbfd9171da4e7e1d77ac91133aba
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/154845
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
Tested-by: RHGS Build Bot <nigelb@redhat.com>
---
libglusterfs/src/statedump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libglusterfs/src/statedump.c b/libglusterfs/src/statedump.c
index a123adb..a4635f3 100644
--- a/libglusterfs/src/statedump.c
+++ b/libglusterfs/src/statedump.c
@@ -812,7 +812,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) {
--
1.8.3.1