diff options
author | Maxim Biro <nurupo.contributions@gmail.com> | 2016-11-15 03:06:52 -0500 |
---|---|---|
committer | Maxim Biro <nurupo.contributions@gmail.com> | 2016-11-20 20:14:53 -0500 |
commit | a403c996b57224245096b493568374cb977a97db (patch) | |
tree | 5ff15fc096b86e319aa7c3097363b6f5dac09682 | |
parent | 6e1a01bd1662f9ccb834ebdd706f753ca22ff2cf (diff) |
Fix a memory leak in hstox interface
-rw-r--r-- | testing/hstox/methods.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) | |||
143 | } | 143 | } |
144 | } | 144 | } |
145 | 145 | ||
146 | return memcmp(transformed, expected, max_size); | 146 | int result = memcmp(transformed, expected, max_size); |
147 | |||
148 | free(transformed); | ||
149 | |||
150 | return result; | ||
147 | } | 151 | } |