From 8430cfd24c7b0b0e72ad7b97389de6edd188b735 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 15 Nov 2024 14:28:52 -0500 Subject: Avoid potential memory leak in test --- test/test_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_hash.c b/test/test_hash.c index 07ec529..31c7e45 100644 --- a/test/test_hash.c +++ b/test/test_hash.c @@ -193,8 +193,8 @@ stress_with(ZixAllocator* const allocator, if (not_indexed) { memcpy(not_indexed, not_indexed_string, strlen(not_indexed_string) + 1); const char* match = (const char*)zix_hash_find_record(hash, not_indexed); - ENSUREV(&state, !match, "Unexpectedly found `%s'\n", not_indexed); free(not_indexed); + ENSUREV(&state, !match, "Unexpectedly found `%s'\n", not_indexed_string); } // Remove strings -- cgit v1.2.1