diff --git a/ctdb/lib/replace/test/testsuite.c b/ctdb/lib/replace/test/testsuite.c index 52629ec82e5..387f096552f 100644 --- a/ctdb/lib/replace/test/testsuite.c +++ b/ctdb/lib/replace/test/testsuite.c @@ -266,12 +266,14 @@ static int test_strndup(void) x = strndup("bla", 2); if (strcmp(x, "bl") != 0) { printf("failure: strndup [\ninvalid\n]\n"); + free(x); return false; } free(x); x = strndup("bla", 10); if (strcmp(x, "bla") != 0) { printf("failure: strndup [\ninvalid\n]\n"); + free(x); return false; } free(x);