unit-tests: Clean up memory in new asn1 unit tests

Test runner checks for leaks when leak detective is enabled.
This commit is contained in:
Martin Willi
2013-11-06 10:31:00 +01:00
parent 712940d161
commit 382fa8b419
@@ -45,6 +45,7 @@ START_TEST(test_asn1_algorithmIdentifier)
{ {
algid = asn1_algorithmIdentifier(test[i].n); algid = asn1_algorithmIdentifier(test[i].n);
ck_assert(chunk_equals(algid, test[i].algid)); ck_assert(chunk_equals(algid, test[i].algid));
free(algid.ptr);
} }
} }
END_TEST END_TEST
@@ -527,6 +528,7 @@ START_TEST(test_asn1_from_time)
} }
chunk = asn1_from_time(&test[i].time, test[i].type); chunk = asn1_from_time(&test[i].time, test[i].type);
ck_assert(chunk_equals(chunk, test[i].chunk)); ck_assert(chunk_equals(chunk, test[i].chunk));
free(chunk.ptr);
} }
} }
END_TEST END_TEST