diff mbox series

parse_external: fix coverity #349327

Message ID 20240604134049.1492434-1-stefano.babic@swupdate.org
State Accepted
Headers show
Series parse_external: fix coverity #349327 | expand

Commit Message

Stefano Babic June 4, 2024, 1:40 p.m. UTC
Not initialized hardware structure.

Signed-off-by: Stefano Babic <stefano.babic@swupdate.org>
---
 parser/parse_external.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.34.1
diff mbox series

Patch

diff --git a/parser/parse_external.c b/parser/parse_external.c
index eef2b09a..20ac0771 100644
--- a/parser/parse_external.c
+++ b/parser/parse_external.c
@@ -110,7 +110,7 @@  int parse_external(struct swupdate_cfg *software, const char *filename,
 	int ret;
 	unsigned int nstreams;
 	struct img_type *image;
-	struct hw_type hardware;
+	struct hw_type hardware = {0};

 	lua_State *L = luaL_newstate(); /* opens Lua */
 	luaL_openlibs(L); /* opens the standard libraries */