mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
test-util-filemonitor: Plug unlikely memory leak
test_file_monitor_events() leaks an Error object when qemu_file_monitor_add_watch() fails, which seems unlikely. Plug it. Cc: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200630090351.1247703-11-armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
b98e8d1230
commit
05584d12ae
1 changed files with 1 additions and 0 deletions
|
|
@ -495,6 +495,7 @@ test_file_monitor_events(void)
|
|||
if (*op->watchid < 0) {
|
||||
g_printerr("Unable to add watch %s",
|
||||
error_get_pretty(local_err));
|
||||
error_free(local_err);
|
||||
goto cleanup;
|
||||
}
|
||||
if (debug) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue