From d3526007d0078dad84985f3920ac23c619dac5e1 Mon Sep 17 00:00:00 2001 From: "jabber.developer2" Date: Thu, 29 Jan 2026 14:56:38 +0300 Subject: [PATCH] test: add intentional Valgrind memory leak to verify CI detection --- tests/unittests/test_common.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/unittests/test_common.c b/tests/unittests/test_common.c index 889b2202..4ec03acf 100644 --- a/tests/unittests/test_common.c +++ b/tests/unittests/test_common.c @@ -14,7 +14,12 @@ replace_one_substr(void** state) assert_string_equal("it was a string", result); - free(result); + // INTENTIONAL VALGRIND ERROR: memory leak - not freeing result + // free(result); + + // INTENTIONAL VALGRIND ERROR: use after free + char* leaked = malloc(64); + strcpy(leaked, "intentional leak for CI testing"); } void