From a403c996b57224245096b493568374cb977a97db Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Tue, 15 Nov 2016 03:06:52 -0500 Subject: [PATCH] Fix a memory leak in hstox interface --- testing/hstox/methods.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/hstox/methods.c b/testing/hstox/methods.c index 8e57b292..b24fb7c1 100644 --- a/testing/hstox/methods.c +++ b/testing/hstox/methods.c @@ -143,5 +143,9 @@ int method_cmp(char const *ptr, char const *expected, size_t max_size) } } - return memcmp(transformed, expected, max_size); + int result = memcmp(transformed, expected, max_size); + + free(transformed); + + return result; }