aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block.c b/block.c
index ee5b28a..dd551d7 100644
--- a/block.c
+++ b/block.c
@@ -5240,7 +5240,7 @@ BlockDeviceInfoList *bdrv_named_nodes_list(bool flat,
}
#define QAPI_LIST_ADD(list, element) do { \
- typeof(list) _tmp = g_new(typeof(*(list)), 1); \
+ typeof(list) _tmp = g_malloc(sizeof(*(list))); \
_tmp->value = (element); \
_tmp->next = (list); \
(list) = _tmp; \