Blame SOURCES/0216-cxl-filter-Fix-an-uninitialized-pointer-dereference.patch

26ccd9
From 934d2b34b616566163d80f5844b371ecf88d646a Mon Sep 17 00:00:00 2001
26ccd9
From: Vishal Verma <vishal.l.verma@intel.com>
26ccd9
Date: Tue, 23 Aug 2022 01:45:27 -0600
26ccd9
Subject: [PATCH 216/217] cxl/filter: Fix an uninitialized pointer dereference
26ccd9
26ccd9
Static analysis points out that there was a chance that 'jdecoder' could
26ccd9
be used while uninitialized in walk_decoders(). Initialize it to NULL to
26ccd9
avoid this.
26ccd9
26ccd9
Link: https://lore.kernel.org/r/20220823074527.404435-4-vishal.l.verma@intel.com
26ccd9
Cc: Dan Williams <dan.j.williams@intel.com>
26ccd9
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
26ccd9
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
26ccd9
---
26ccd9
 cxl/filter.c | 2 +-
26ccd9
 1 file changed, 1 insertion(+), 1 deletion(-)
26ccd9
26ccd9
diff --git a/cxl/filter.c b/cxl/filter.c
26ccd9
index 9a3de8c..56c6599 100644
26ccd9
--- a/cxl/filter.c
26ccd9
+++ b/cxl/filter.c
26ccd9
@@ -796,7 +796,7 @@ static void walk_decoders(struct cxl_port *port, struct cxl_filter_params *p,
26ccd9
 	cxl_decoder_foreach(port, decoder) {
26ccd9
 		const char *devname = cxl_decoder_get_devname(decoder);
26ccd9
 		struct json_object *jchildregions = NULL;
26ccd9
-		struct json_object *jdecoder;
26ccd9
+		struct json_object *jdecoder = NULL;
26ccd9
 
26ccd9
 		if (!p->decoders)
26ccd9
 			goto walk_children;
26ccd9
-- 
26ccd9
2.27.0
26ccd9