aboutsummaryrefslogtreecommitdiff
path: root/tests/test-util-filemonitor.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-06-30 11:03:35 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-07-02 06:25:29 +0200
commit05584d12ae0c818665637b7ec580b600920d3027 (patch)
tree0a8ebed940881270c63417820d418640a1923058 /tests/test-util-filemonitor.c
parentb98e8d1230ff7023bb34ddeb7194424dfcbaf789 (diff)
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>
Diffstat (limited to 'tests/test-util-filemonitor.c')
-rw-r--r--tests/test-util-filemonitor.c1
1 files changed, 1 insertions, 0 deletions
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) {