mirror of https://github.com/xemu-project/xemu.git
qapi: input_type_enum(): fix error message
The enum string is pointed to by 'enum_str' not 'name'. This bug causes the error message to be: { "error": { "class": "InvalidParameter", "desc": "Invalid parameter 'null'", "data": { "name": "null" } } } Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Amos Kong <akong@redhat.com>
This commit is contained in:
parent
f5b0d93bcb
commit
94c3db85b4
|
@ -298,7 +298,7 @@ void input_type_enum(Visitor *v, int *obj, const char *strings[],
|
|||
}
|
||||
|
||||
if (strings[value] == NULL) {
|
||||
error_set(errp, QERR_INVALID_PARAMETER, name ? name : "null");
|
||||
error_set(errp, QERR_INVALID_PARAMETER, enum_str);
|
||||
g_free(enum_str);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue