Branch: Tag:

2001-11-12

2001-11-12 15:59:09 by Martin Stjernholm <mast@lysator.liu.se>

Fixed a minor leak when pthread_atfork doesn't exist.

Rev: src/threads.c:1.160

1:   #include "global.h" - RCSID("$Id: threads.c,v 1.159 2001/10/22 23:52:54 mast Exp $"); + RCSID("$Id: threads.c,v 1.160 2001/11/12 15:59:09 mast Exp $");      PMOD_EXPORT int num_threads = 1;   PMOD_EXPORT int threads_disabled = 0;
31: Inside #if undefined(HAVE_PTHREAD_ATFORK)
     #ifndef HAVE_PTHREAD_ATFORK   #include "callback.h" + #define PIKE_USE_OWN_ATFORK      static struct callback_list atfork_prepare_callback;   static struct callback_list atfork_parent_callback;
1554:    free_program(thread_id_prog);    thread_id_prog=0;    } +  + #ifdef PIKE_USE_OWN_ATFORK +  free_callback_list(&atfork_prepare_callback); +  free_callback_list(&atfork_parent_callback); +  free_callback_list(&atfork_child_callback); + #endif   }      #endif