summaryrefslogtreecommitdiffstats
path: root/include/exec
diff options
context:
space:
mode:
authorEric Blake2016-01-29 14:49:00 +0100
committerMarkus Armbruster2016-02-08 17:29:57 +0100
commita86156401559cb4401cf9ecc704faeab6fc8bb19 (patch)
treec82c2d075601d6d394e940f331123ed34f900268 /include/exec
parentqapi: Drop unused error argument for list and implicit struct (diff)
downloadqemu-a86156401559cb4401cf9ecc704faeab6fc8bb19.tar.gz
qemu-a86156401559cb4401cf9ecc704faeab6fc8bb19.tar.xz
qemu-a86156401559cb4401cf9ecc704faeab6fc8bb19.zip
qmp: Fix reference-counting of qnull on empty output visit
Commit 6c2f9a15 ensured that we would not return NULL when the caller used an output visitor but had nothing to visit. But in doing so, it added a FIXME about a reference count leak that could abort qemu in the (unlikely) case of SIZE_MAX such visits (more plausible on 32-bit). (Although that commit suggested we might fix it in time for 2.5, we ran out of time; fortunately, it is unlikely enough to bite that it was not worth worrying about during the 2.5 release.) This fixes things by documenting the internal contracts, and explaining why the internal function can return NULL and only the public facing interface needs to worry about qnull(), thus avoiding over-referencing the qnull_ global object. It does not, however, fix the stupidity of the stack mixing up two separate pieces of information; add a FIXME to explain that issue, which will be fixed shortly in a future patch. Signed-off-by: Eric Blake <eblake@redhat.com> Cc: qemu-stable@nongnu.org Message-Id: <1454075341-13658-25-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'include/exec')
0 files changed, 0 insertions, 0 deletions