]> git.proxmox.com Git - mirror_qemu.git/commit - tests/test-qmp-input-visitor.c
qapi: Document that input visitor semantics are prone to leaks
authorEric Blake <eblake@redhat.com>
Thu, 30 Jul 2015 22:33:07 +0000 (16:33 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 4 Sep 2015 13:47:14 +0000 (15:47 +0200)
commit2f52e20597ebd55ede668b2b7d162a84f419b03e
tree661fd001dfeeab007a71e9469e42dae58f0f298d
parent999387782f736d7ac0083f4f02e2bc4ce7a9a27b
qapi: Document that input visitor semantics are prone to leaks

Most functions that can return a pointer or set an Error ** value
are decent enough to guarantee a NULL return when reporting an error.
Not so with our generated qapi visitor functions.  If the caller
is not careful to clean up partially-allocated objects on error,
then the caller suffers a memory leak.

Properly fixing it is probably complex enough to save for a later
day, so merely document it for now.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1438295587-19069-1-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
scripts/qapi-visit.py
tests/test-qmp-input-visitor.c