Fix trivial memory leaks in tests.
authorJustus Winter <justus@g10code.com>
Fri, 1 Jul 2016 07:47:48 +0000 (09:47 +0200)
committerJustus Winter <justus@g10code.com>
Fri, 1 Jul 2016 07:47:48 +0000 (09:47 +0200)
* dirmngr/t-ldap-parse-uri.c (check_ldap_escape_filter): Free result.
* g10/t-stutter.c (main): Free file name.

Signed-off-by: Justus Winter <justus@g10code.com>
dirmngr/t-ldap-parse-uri.c
g10/t-stutter.c

index 100ce0d..145b47a 100644 (file)
@@ -222,6 +222,8 @@ check_ldap_escape_filter (int test_count, struct test_ldap_escape_filter *test)
              test->filter, result, test->result);
       fail (test_count * 1000);
     }
+
+  xfree (result);
 }
 
 static void
index 9576027..f3fc653 100644 (file)
@@ -606,5 +606,6 @@ main (int argc, char *argv[])
       log_fatal ("Message is too short, nothing to test.\n");
   }
 
+  xfree (filename);
   return failed;
 }