* lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF, _AC_FUNC_REALLOC_IF):
Free heap-allocated storage before exiting.
[AC_LANG_PROGRAM(
[[#include <stdlib.h>
]],
- [return ! malloc (0);])],
+ [char *p = malloc (0);
+ int result = !p;
+ free (p);
+ return result;])],
[ac_cv_func_malloc_0_nonnull=yes],
[ac_cv_func_malloc_0_nonnull=no],
[case "$host_os" in # ((
[AC_LANG_PROGRAM(
[[#include <stdlib.h>
]],
- [return ! realloc (0, 0);])],
+ [char *p = realloc (0, 0);
+ int result = !p;
+ free (p);
+ return result;])],
[ac_cv_func_realloc_0_nonnull=yes],
[ac_cv_func_realloc_0_nonnull=no],
[case "$host_os" in # ((