From 283fa8f6ab994d681f74abcc27dc5a4bfbf037c9 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Tue, 28 Oct 2008 22:43:49 +0000 Subject: [PATCH] Cleanup memory leaks in test program for dynamically allocated buffers.. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20934 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/support/t_k5buf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/support/t_k5buf.c b/src/util/support/t_k5buf.c index b7f284b46..cfb2547f6 100644 --- a/src/util/support/t_k5buf.c +++ b/src/util/support/t_k5buf.c @@ -207,6 +207,7 @@ static void test_truncate() s = krb5int_buf_cstr(&buf); len = krb5int_buf_len(&buf); fail_if(!s || len != 7 || strcmp(s, "abcdefg") != 0, "truncate"); + krb5int_free_buf(&buf); } static void test_binary() @@ -224,6 +225,7 @@ static void test_binary() fail_if(!s || len != 6, "binary"); fail_if(s[0] != 'a' || s[1] != 0 || s[2] != 'b', "binary"); fail_if(s[3] != 'a' || s[4] != 0 || s[5] != 'b', "binary"); + krb5int_free_buf(&buf); } static void test_fmt() @@ -269,6 +271,7 @@ static void test_fmt() s = krb5int_buf_cstr(&buf); len = krb5int_buf_len(&buf); fail_if(!s || len != 1029 || strcmp(s + 6, data) != 0, "fmt 4"); + krb5int_free_buf(&buf); } int main() -- 2.26.2