mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
qobject: Update coccinelle script to catch Q{INC, DEC}REF
The recent commit b097efc0 used qobject_decref(QOBJECT(E)), even
though we already have QDECREF(E) for that purpose. We can update
our coccinelle script to catch any future relapses; with that in
place, the rest of the patch is generated with:
spatch --sp-file scripts/coccinelle/qobject.cocci \
--macro-file scripts/cocci-macro-file.h --dir . --in-place
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20170624181008.25497-3-eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
187f47e947
commit
8a4613a0ab
2 changed files with 7 additions and 1 deletions
|
|
@ -3842,7 +3842,7 @@ static void handle_qmp_command(JSONMessageParser *parser, GQueue *tokens)
|
|||
|
||||
req_json = qobject_to_json(req);
|
||||
trace_handle_qmp_command(mon, qstring_get_str(req_json));
|
||||
qobject_decref(QOBJECT(req_json));
|
||||
QDECREF(req_json);
|
||||
|
||||
rsp = qmp_dispatch(cur_mon->qmp.commands, req);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue