diff options
Diffstat (limited to 'qapi/qmp-input-visitor.c')
-rw-r--r-- | qapi/qmp-input-visitor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qapi/qmp-input-visitor.c b/qapi/qmp-input-visitor.c index fcf8bf920b..8cbc0abcfd 100644 --- a/qapi/qmp-input-visitor.c +++ b/qapi/qmp-input-visitor.c @@ -144,8 +144,6 @@ static GenericList *qmp_input_next_list(Visitor *v, GenericList **list, } (*list)->next = entry; } - *list = entry; - return entry; } @@ -240,9 +238,11 @@ static void qmp_input_type_enum(Visitor *v, int *obj, const char *strings[], if (strings[value] == NULL) { error_set(errp, QERR_INVALID_PARAMETER, name ? name : "null"); + g_free(enum_str); return; } + g_free(enum_str); *obj = value; } |