Commit d2ef83fcdc0c9cad633e7b654ab789d17f583f30

Ramsay Jones 2009-08-28T20:22:03

t0101-oid.c: Fix a memory leak reported by valgrind Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/tests/t0101-oid.c b/tests/t0101-oid.c
index e682310..4a143ab 100644
--- a/tests/t0101-oid.c
+++ b/tests/t0101-oid.c
@@ -1,5 +1,6 @@
 #include "test_lib.h"
 #include <git/oid.h>
+#include <stdlib.h>
 
 BEGIN_TEST(oid_szs)
 	git_oid out;
@@ -186,6 +187,7 @@ BEGIN_TEST(cmp_oid_allocfmt)
 	out = git_oid_allocfmt(&in);
 	must_be_true(out);
 	must_pass(strcmp(exp, out));
+	free(out);
 END_TEST
 
 BEGIN_TEST(cmp_oid_pathfmt)