[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 10/26] test-util-filemonitor: Plug unlikely memory leak
From: |
Markus Armbruster |
Subject: |
[PATCH v3 10/26] test-util-filemonitor: Plug unlikely memory leak |
Date: |
Tue, 30 Jun 2020 11:03:35 +0200 |
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>
---
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
- [PATCH v3 00/26] Error handling fixes & cleanups, Markus Armbruster, 2020/06/30
- [PATCH v3 04/26] tests: Use &error_abort where appropriate, Markus Armbruster, 2020/06/30
- [PATCH v3 10/26] test-util-filemonitor: Plug unlikely memory leak,
Markus Armbruster <=
- [PATCH v3 05/26] tests: Use error_free_or_abort() where appropriate, Markus Armbruster, 2020/06/30
- [PATCH v3 08/26] qga: Plug unlikely memory leak in guest-set-memory-blocks, Markus Armbruster, 2020/06/30
- [PATCH v3 07/26] spapr: Plug minor memory leak in spapr_machine_init(), Markus Armbruster, 2020/06/30
- [PATCH v3 09/26] sd/milkymist-memcard: Plug minor memory leak in realize, Markus Armbruster, 2020/06/30
- [PATCH v3 12/26] aspeed: Clean up roundabout error propagation, Markus Armbruster, 2020/06/30
- [PATCH v3 13/26] qdev: Drop qbus_set_bus_hotplug_handler() parameter @errp, Markus Armbruster, 2020/06/30
- [PATCH v3 14/26] qdev: Drop qbus_set_hotplug_handler() parameter @errp, Markus Armbruster, 2020/06/30
- [PATCH v3 03/26] Clean up some calls to ignore Error objects the right way, Markus Armbruster, 2020/06/30