From 92ce833722f80de44bcc340f24019228565ee33f Mon Sep 17 00:00:00 2001 From: John Birrell Date: Wed, 30 Sep 1998 06:24:57 +0000 Subject: NULL a pointer after it is freed to avoid trying to free it again. --- lib/libpthread/thread/thr_spec.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/libpthread') diff --git a/lib/libpthread/thread/thr_spec.c b/lib/libpthread/thread/thr_spec.c index 745a14509b9e6..8558dff85980f 100644 --- a/lib/libpthread/thread/thr_spec.c +++ b/lib/libpthread/thread/thr_spec.c @@ -119,10 +119,12 @@ _thread_cleanupspecific(void) destructor(data); } else { free(_thread_run->specific_data); + _thread_run->specific_data = NULL; return; } } } + _thread_run->specific_data = NULL; free(_thread_run->specific_data); } -- cgit v1.3