[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] hw/core: define stack variable to NULL to fix qtest with sanitiz
|
From: |
Daniel Hoffman |
|
Subject: |
[PATCH] hw/core: define stack variable to NULL to fix qtest with sanitizers |
|
Date: |
Thu, 23 Nov 2023 17:53:12 -0800 |
This was the only failure preventing `make check` from passing with sanitizers
enabled on my configuration.
Signed-off-by: Daniel Hoffman <dhoff749@gmail.com>
---
hw/core/qdev-properties.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 91632f7be9f..4caa78b7bc5 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -690,7 +690,7 @@ static void get_prop_array(Object *obj, Visitor *v, const
char *name,
uint32_t *alenptr = object_field_prop_ptr(obj, prop);
void **arrayptr = (void *)obj + prop->arrayoffset;
char *elem = *arrayptr;
- GenericList *list;
+ GenericList *list = NULL;
const size_t list_elem_size = sizeof(*list) + prop->arrayfieldsize;
int i;
bool ok;
--
2.40.1
- [PATCH] hw/core: define stack variable to NULL to fix qtest with sanitizers,
Daniel Hoffman <=