qemu/include/qapi/qmp
Markus Armbruster 2d36e84304 qobject: qobject_from_jsonv() is dangerous, hide it away
qobject_from_jsonv() takes ownership of %p arguments.  On failure, we
can't generally know whether we failed before or after %p, so
ownership becomes indeterminate.  To avoid leaks, callers passing %p
must terminate on error, e.g. by passing &error_abort.  Trap for the
unwary; document and give the function internal linkage.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180806065344.7103-11-armbru@redhat.com>
2018-08-16 08:42:06 +02:00
..
dispatch.h qmp: Use QDict * instead of QObject * for response objects 2018-07-03 23:18:56 +02:00
json-lexer.h include: Clean up includes 2016-02-23 12:43:05 +00:00
json-parser.h Include qapi/qmp/qlist.h exactly where needed 2018-02-09 13:52:15 +01:00
json-streamer.h include: Clean up includes 2016-02-23 12:43:05 +00:00
qbool.h qobject: use a QObjectBase_ struct 2018-05-04 08:27:53 +02:00
qdict.h block: Add block-specific QDict header 2018-06-15 14:49:44 +02:00
qerror.h qmp: Eliminate silly QERR_QMP_* macros 2017-03-05 09:14:19 +01:00
qjson.h qobject: qobject_from_jsonv() is dangerous, hide it away 2018-08-16 08:42:06 +02:00
qlist.h qobject: use a QObjectBase_ struct 2018-05-04 08:27:53 +02:00
qlit.h qlit: add qobject_from_qlit() 2018-03-19 10:00:14 -05:00
qnull.h qobject: Modify qobject_ref() to return obj 2018-05-04 08:27:53 +02:00
qnum.h qobject: use a QObjectBase_ struct 2018-05-04 08:27:53 +02:00
qobject.h qobject: Modify qobject_ref() to return obj 2018-05-04 08:27:53 +02:00
qstring.h qstring: Fix qstring_from_substr() not to provoke int overflow 2018-07-28 09:09:58 +02:00