mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
qtest: do not return freed argument vector from qtest_rsp
If expected_args is 0, qtest frees the argument vector and then returns it nevertheless. Coverity complains; in practice this is not an issue because expected_args == 0 means that the caller is not interested in the argument vector, but it would be a potential problem if somebody wanted to add commands with optional arguments to qtest. Suggested-by: Kamil Dudka <kdudka@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201120073149.99079-1-pbonzini@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
7aed584ca6
commit
88a8b27e55
@ -545,6 +545,7 @@ redo:
|
||||
}
|
||||
} else {
|
||||
g_strfreev(words);
|
||||
words = NULL;
|
||||
}
|
||||
|
||||
return words;
|
||||
|
Loading…
Reference in New Issue
Block a user