From 447b88a115cc98589625742a21e5d7475c4dba2e Mon Sep 17 00:00:00 2001 From: Eric Haszlakiewicz Date: Thu, 29 Nov 2012 13:29:55 -0600 Subject: [PATCH] Fix a memory leak in the test_printbuf test. --- tests/test_printbuf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_printbuf.c b/tests/test_printbuf.c index 9a465669..fed185e1 100644 --- a/tests/test_printbuf.c +++ b/tests/test_printbuf.c @@ -124,6 +124,7 @@ static void test_sprintbuf(int before_resize) memset(data, 'X', before_resize + 1 + 1); data[before_resize + 1] = '\0'; sprintbuf(pb, "%s", data); + free(data); printf("sprintbuf to just after resize(%d+1): %d, [%s], strlen(buf)=%d\n", before_resize, printbuf_length(pb), pb->buf, (int)strlen(pb->buf)); printbuf_reset(pb); -- 2.47.2