From 77b8bc7e22c7c9e1869b487fac99c76785004033 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Thu, 10 Nov 2016 15:33:02 +0300 Subject: [PATCH] Fixed building with GCC ASan. --- nxt/auto/memalign | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nxt/auto/memalign b/nxt/auto/memalign index 8aa59d14..aa2e8c21 100644 --- a/nxt/auto/memalign +++ b/nxt/auto/memalign @@ -18,6 +18,8 @@ nxt_feature_test="#include if (posix_memalign(&p, 4096, 4096) != 0) return 1; + + free(p); return 0; }" . ${NXT_AUTO}feature @@ -35,8 +37,13 @@ if [ $nxt_found = no ]; then nxt_feature_test="#include int main(void) { - if (memalign(4096, 4096) == NULL) + void *p; + + p = memalign(4096, 4096) + if (p == NULL) return 1; + + free(p); return 0; }" . ${NXT_AUTO}feature -- 2.47.3