From 63deed9fc9da5060e52d06ffa7d8766977f1ed0c Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 14 Jan 2013 12:02:28 -0500 Subject: [PATCH] fix double-destroy seg --- libs/sofia-sip/libsofia-sip-ua/su/su_uniqueid.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 f27f87beb5..526a392552 100644 --- a/libs/sofia-sip/libsofia-sip-ua/su/su_uniqueid.c +++ b/libs/sofia-sip/libsofia-sip-ua/su/su_uniqueid.c @@ -196,8 +196,10 @@ void sofia_su_uniqueid_destructor(void) { #if HAVE_DEV_URANDOM - if (urandom) - fclose(urandom); + if (urandom) { + fclose(urandom); + urandom=NULL; + } #endif /* HAVE_DEV_URANDOM */ #if SU_HAVE_PTHREADS