summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-09-30 06:24:57 +0000
committerjb <jb@FreeBSD.org>1998-09-30 06:24:57 +0000
commit1326d7916eb67796a6dbb8e51347e5a20af03959 (patch)
tree94c7742cef3a3e7e18df93cd200cff46d90abf41 /lib/libpthread
parent91d2ee98318cba6ca2d8e92500ff4c06de7626ce (diff)
downloadFreeBSD-src-1326d7916eb67796a6dbb8e51347e5a20af03959.zip
FreeBSD-src-1326d7916eb67796a6dbb8e51347e5a20af03959.tar.gz
NULL a pointer after it is freed to avoid trying to free it again.
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/thread/thr_spec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_spec.c b/lib/libpthread/thread/thr_spec.c
index 745a145..8558dff 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);
}
OpenPOWER on IntegriCloud