From d52564dc05cdd2fec85236434ef04a268e398781 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 17 May 2018 14:38:11 +0930 Subject: [PATCH] check-source: add check for tal_free(tmpctx). My older rebased patches use this, and I want to catch it. Signed-off-by: Rusty Russell --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b9ccd3f94..5bd73721c 100644 --- a/Makefile +++ b/Makefile @@ -272,7 +272,10 @@ check-shellcheck: check-setup_locale: @tools/check-setup_locale.sh -check-source: check-makefile check-source-bolt check-whitespace check-markdown check-spelling check-python check-includes check-cppcheck check-shellcheck check-setup_locale +check-tmpctx: + @if git grep -n 'tal_free[(]tmpctx)' | grep -Ev '^ccan/|/test/|^common/daemon.c:|^common/utils.c:'; then echo "Don't free tmpctx!">&2; exit 1; fi + +check-source: check-makefile check-source-bolt check-whitespace check-markdown check-spelling check-python check-includes check-cppcheck check-shellcheck check-setup_locale check-tmpctx full-check: check check-source