diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-01-26 15:05:11 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-02-05 17:16:07 +0100 |
commit | e4b77daa5724a9dd41aaa44d2dea4b8e92351081 (patch) | |
tree | 400f986980cddbe191501de75d426e98ce373cfa /tcg/tcg-be-null.h | |
parent | 9d7a4c6690ef9962a3b20034f65008f1ea15c1d6 (diff) |
coverity: Model GLib string allocation partially
Without a model, Coverity can't know that the result of g_strdup()
needs to be fed to g_free().
One way to get such a model is to scan GLib, build a derived model
file with cov-collect-models, and use that when scanning QEMU.
Unfortunately, the Coverity Scan service we use doesn't support that.
Thus, we're stuck with the other way: write a user model. Doing that
for all of GLib is hardly practical. I'm doing it for the "String
Utility Functions" we actually use that return dynamically allocated
strings.
In a local scan, this flags 20 additional RESOURCE_LEAKs. The ones I
checked look genuine.
It also loses a NULL_RETURNS about ppce500_init() using
qemu_find_file() without error checking. I don't understand why.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tcg/tcg-be-null.h')
0 files changed, 0 insertions, 0 deletions