Fri Mar 7 12:24:05 EST 2008 Pekka.Pessi@nokia.com

* su_alloc.c: using safe free



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7827 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2008-03-07 17:50:32 +00:00
parent aeb1829220
commit 2abc13f368
2 changed files with 35 additions and 7 deletions
+22
View File
@@ -202,6 +202,28 @@ SAC_SU_DEFINE([SU_HAVE_TAGSTACK], 1, [
Define this as 1 if your compiler puts the variable argument list nicely in memory])
fi
### ======================================================================
### Test if free(0) fails
###
AC_CACHE_CHECK([for graceful free(0)],[ac_cv_free_null],[
ac_cv_free_null=no
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdlib.h>
int main(int avc, char **av)
{
free(0);
return 0;
}
]])],[ac_cv_free_null=yes],[ac_cv_free_null=no],[ac_cv_free_null=no])])
if test $ac_cv_free_null = yes ; then
AC_DEFINE([HAVE_FREE_NULL], 1, [
Define this as 1 if your c library does not crash with free(0)])
fi
dnl ======================================================================
dnl Socket features