fix double-destroy seg

This commit is contained in:
Michael Jerris 2013-01-14 12:02:28 -05:00
parent d04016dd89
commit 63deed9fc9
1 changed files with 4 additions and 2 deletions

View File

@ -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