summaryrefslogtreecommitdiff
path: root/common/tests
diff options
context:
space:
mode:
Diffstat (limited to 'common/tests')
-rw-r--r--common/tests/test-hash.c2
-rw-r--r--common/tests/test-utf8.c4
-rw-r--r--common/tests/test-x509.c1
3 files changed, 7 insertions, 0 deletions
diff --git a/common/tests/test-hash.c b/common/tests/test-hash.c
index d6d7990..c8694e1 100644
--- a/common/tests/test-hash.c
+++ b/common/tests/test-hash.c
@@ -89,6 +89,8 @@ test_sha1_long (CuTest *cu)
p11_hash_sha1 (checksum, input, 1000000, NULL);
CuAssertTrue (cu, memcmp (expected, checksum, P11_HASH_SHA1_LEN) == 0);
+
+ free (input);
}
const char *md5_input[] = {
diff --git a/common/tests/test-utf8.c b/common/tests/test-utf8.c
index d34f597..ed13fa2 100644
--- a/common/tests/test-utf8.c
+++ b/common/tests/test-utf8.c
@@ -38,6 +38,7 @@
#include "utf8.h"
#include <stdio.h>
+#include <stdlib.h>
#define ELEMS(x) (sizeof (x) / sizeof (x[0]))
@@ -74,6 +75,7 @@ test_ucs2be (CuTest *cu)
CuAssertIntEquals (cu, fixtures[i].output_len, length);
CuAssertStrEquals (cu, fixtures[i].output, output);
+ free (output);
}
}
@@ -146,6 +148,8 @@ test_ucs4be (CuTest *cu)
CuAssertIntEquals (cu, fixtures[i].output_len, length);
CuAssertStrEquals (cu, fixtures[i].output, output);
+
+ free (output);
}
}
diff --git a/common/tests/test-x509.c b/common/tests/test-x509.c
index 08c269d..2596c9c 100644
--- a/common/tests/test-x509.c
+++ b/common/tests/test-x509.c
@@ -397,6 +397,7 @@ test_directory_string (CuTest *tc)
CuAssertIntEquals (tc, fixtures[i].output_len, length);
CuAssertStrEquals (tc, fixtures[i].output, string);
+ free (string);
}
}