From: Michael Jerris Date: Thu, 12 Feb 2009 21:21:30 +0000 (+0000) Subject: Thu Feb 12 14:45:02 CST 2009 Pekka Pessi X-Git-Tag: v1.0.3~187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0eceb861b09805852461bd4db8cbdb3cfb78095b;p=thirdparty%2Ffreeswitch.git Thu Feb 12 14:45:02 CST 2009 Pekka Pessi * su_uniqueid: call initstate() with memory from heap Ignore-this: af9e58551676e173844d0b77af0e287a When libsofia-sip-ua.so gets unloaded, its data segment gets unloaded, but random() still wants to use the memory. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11956 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 67e5832bde..d47b299081 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Thu Feb 12 15:19:02 CST 2009 +Thu Feb 12 15:21:20 CST 2009 diff --git a/libs/sofia-sip/libsofia-sip-ua/su/su_uniqueid.c b/libs/sofia-sip/libsofia-sip-ua/su/su_uniqueid.c index b96d9ea61d..6c2a72bd5e 100644 --- a/libs/sofia-sip/libsofia-sip-ua/su/su_uniqueid.c +++ b/libs/sofia-sip/libsofia-sip-ua/su/su_uniqueid.c @@ -136,7 +136,12 @@ static void init(void) { int i; +#if HAVE_INITSTATE + /* Allow libsofia-sip-ua.so to unload. */ + uint32_t *seed = calloc(32, sizeof *seed); +#else static uint32_t seed[32] = { 0 }; +#endif su_time_t now; initialized = 1; diff --git a/libs/sofia-sip/m4/sac-su2.m4 b/libs/sofia-sip/m4/sac-su2.m4 index 5b47ef4fe4..cd477331c4 100644 --- a/libs/sofia-sip/m4/sac-su2.m4 +++ b/libs/sofia-sip/m4/sac-su2.m4 @@ -526,7 +526,7 @@ AC_SEARCH_LIBS(getaddrinfo, xnet socket nsl) AC_FUNC_ALLOCA -AC_CHECK_FUNCS([gettimeofday strerror random tcsetattr flock \ +AC_CHECK_FUNCS([gettimeofday strerror random initstate tcsetattr flock \ socketpair gethostname gethostbyname getipnodebyname \ poll epoll_create kqueue select if_nameindex \ signal alarm \