Re: [PATCH v3 10/26] test-util-filemonitor: Plug unlikely memory leak

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 11:03:35AM +0200, Markus Armbruster wrote:
> test_file_monitor_events() leaks an Error object when
> qemu_file_monitor_add_watch() fails, which seems unlikely.  Plug it.
> 
> Cc: Daniel P. Berrangé 
> Signed-off-by: Markus Armbruster 
> ---
>  tests/test-util-filemonitor.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Daniel P. Berrangé 


Regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|




[PATCH v3 10/26] test-util-filemonitor: Plug unlikely memory leak

2020-06-30 Thread Markus Armbruster
test_file_monitor_events() leaks an Error object when
qemu_file_monitor_add_watch() fails, which seems unlikely.  Plug it.

Cc: Daniel P. Berrangé 
Signed-off-by: Markus Armbruster 
---
 tests/test-util-filemonitor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/test-util-filemonitor.c b/tests/test-util-filemonitor.c
index 45009c69f4..8f0eff3d03 100644
--- a/tests/test-util-filemonitor.c
+++ b/tests/test-util-filemonitor.c
@@ -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) {
-- 
2.26.2