diff options
Diffstat (limited to 'qapi/opts-visitor.c')
-rw-r--r-- | qapi/opts-visitor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c index ae5b9553fa..73e4acea7b 100644 --- a/qapi/opts-visitor.c +++ b/qapi/opts-visitor.c @@ -215,7 +215,7 @@ opts_start_list(Visitor *v, const char *name, Error **errp) static GenericList * -opts_next_list(Visitor *v, GenericList **list) +opts_next_list(Visitor *v, GenericList **list, size_t size) { OptsVisitor *ov = to_ov(v); GenericList **link; @@ -258,7 +258,7 @@ opts_next_list(Visitor *v, GenericList **list) abort(); } - *link = g_malloc0(sizeof **link); + *link = g_malloc0(size); return *link; } |