summary refs log tree commit diff stats
path: root/tests/unit/test-util-sockets.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test-util-sockets.c')
-rw-r--r--tests/unit/test-util-sockets.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/unit/test-util-sockets.c b/tests/unit/test-util-sockets.c
index 8492f4d68f..ee66d727c3 100644
--- a/tests/unit/test-util-sockets.c
+++ b/tests/unit/test-util-sockets.c
@@ -341,8 +341,12 @@ static void inet_parse_test_helper(const char *str,
     int rc = inet_parse(&addr, str, &error);
 
     if (success) {
+        if (error) {
+            error_report_err(error);
+        }
         g_assert_cmpint(rc, ==, 0);
     } else {
+        error_free(error);
         g_assert_cmpint(rc, <, 0);
     }
     if (exp_addr != NULL) {