From aafaca51cfbdc66a6ff9af52121470f59b9559ac Mon Sep 17 00:00:00 2001 From: pommicket Date: Mon, 15 Sep 2025 19:58:56 -0400 Subject: Check for leaks in `make test` --- Makefile | 3 ++- pom.c | 10 ---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 65a7055..f68e530 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ __build: $(MAKE) -C $(BUILD_DIR) test: __build - valgrind --exit-on-first-error=yes --error-exitcode=1 $(BUILD_DIR)/tests + valgrind --exit-on-first-error=yes --error-exitcode=1 --track-origins=yes \ + --leak-check=full --show-leak-kinds=all $(BUILD_DIR)/tests .PHONY: __build test diff --git a/pom.c b/pom.c index 772df4a..488c7a3 100644 --- a/pom.c +++ b/pom.c @@ -904,16 +904,6 @@ conf_item_cmp_qsort(const void *va, const void *vb) { return strcmp(item_a->key, item_b->key); } -/* -// Returns true if `descendant` starts with `ancestor.`. -static bool -is_descendant(const char *ancestor, const char *descendant) { - size_t ancestor_len = strlen(ancestor); - return memcmp(ancestor, descendant, ancestor_len) == 0 - && descendant[ancestor_len] == '.'; -} -*/ - static size_t conf_binary_search(const pom_conf *conf, const char *key, char nxt_char, bool *found) { size_t lo = 0; -- cgit v1.2.3