summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2011-07-12 18:10:31 +0200
committerCarlos Martín Nieto <cmn@elego.de>2011-07-12 18:19:56 +0200
commit55e1609b2f6208ef7f4cc673e20f540b25d4bd93 (patch)
treeff6c7e5fe961b9cb149921fc6d9310cfb751bcdc
parentb08683ffb2146bb164108a525a9f0a9972f7ed8b (diff)
downloadlibgit2-55e1609b2f6208ef7f4cc673e20f540b25d4bd93.tar.gz
Don't leak the buf when testing it
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
-rw-r--r--tests/t17-bufs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/t17-bufs.c b/tests/t17-bufs.c
index b0269b790..2cbd8c87a 100644
--- a/tests/t17-bufs.c
+++ b/tests/t17-bufs.c
@@ -39,6 +39,7 @@ BEGIN_TEST(buf0, "check that resizing works properly")
git_buf_puts(&buf, test_string);
must_be_true(strlen(git_buf_cstr(&buf)) == strlen(test_string) * 2);
+ git_buf_free(&buf);
END_TEST
BEGIN_TEST(buf1, "check that printf works properly")
@@ -51,6 +52,7 @@ BEGIN_TEST(buf1, "check that printf works properly")
git_buf_printf(&buf, "%s %d", "woop", 42);
must_be_true(git_buf_oom(&buf) == 0);
must_be_true(strcmp(git_buf_cstr(&buf), "shoop da 23 woop 42") == 0);
+ git_buf_free(&buf);
END_TEST
BEGIN_SUITE(buffers)