From 73f0a06f8fbfda194ff19fe5ea4b6cb8e0a4efde Mon Sep 17 00:00:00 2001
From: Nevadita <nevadita.chatterjee@iopsys.eu>
Date: Tue, 2 May 2023 12:57:34 +0000
Subject: [PATCH] map-topology: null initialize json-c object before getting

---
 .gitlab-ci.yml | 2 +-
 src/host.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 03f53be..e4b4954 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,7 @@
 include:
   - project: 'iopsys/gitlab-ci-pipeline'
     file: '/static-code-analysis.yml'
-
+    ref: '0.27'
 stages:
     - static_code_analysis
     - compile_test
diff --git a/src/host.c b/src/host.c
index fca12b1..e82d4e7 100644
--- a/src/host.c
+++ b/src/host.c
@@ -796,7 +796,7 @@ int get_ifmask(char *ifname, char *buf)
 
 int host_get_parent_iface(struct topologyd_private *priv, struct host_node *p)
 {
-	struct json_object *iface_array;
+	struct json_object *iface_array = NULL;
 	int i = 0, len = 0;
 
 	if (!p || !priv || !priv->ieee1905_interfaces)
-- 
GitLab