From: Valentin Bartenev Date: Thu, 10 Nov 2016 12:33:02 +0000 (+0300) Subject: Fixed building with GCC ASan. X-Git-Tag: 0.1.5~9 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=77b8bc7e22c7c9e1869b487fac99c76785004033;p=njs.git Fixed building with GCC ASan. --- 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