mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 11:53:39 +08:00
694a099a54
Today we generate something like this: int qmp_marshal_input_query_foo(...) ... retval = qmp_query_foo(errp); qmp_marshal_output_query_foo(retval, ret, errp); ... However, if qmp_query_foo() fails 'retval' will probably be NULL, which can cause a segfault as not all visitors check if 'retval' is valid. This commit fixes that by changing the code generator to only call the output marshal if qmp_query_foo() succeeds, like this: retval = qmp_query_foo(errp); if (!error_is_set(errp)) { qmp_marshal_output_query_foo(retval, ret, errp); } Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> |
||
---|---|---|
.. | ||
analyse-9p-simpletrace.py | ||
checkpatch.pl | ||
create_config | ||
feature_to_c.sh | ||
get_maintainer.pl | ||
hxtool | ||
make_device_config.sh | ||
ordereddict.py | ||
qapi-commands.py | ||
qapi-types.py | ||
qapi-visit.py | ||
qapi.py | ||
qemu-binfmt-conf.sh | ||
refresh-pxe-roms.sh | ||
signrom.sh | ||
simpletrace.py | ||
texi2pod.pl | ||
tracetool | ||
update-linux-headers.sh |