diff options
author | David Xu <davidxu@FreeBSD.org> | 2010-08-27 03:23:07 +0000 |
---|---|---|
committer | David Xu <davidxu@FreeBSD.org> | 2010-08-27 03:23:07 +0000 |
commit | 8e60ce996b14d8d41112ad374e3b2d6fc02b6823 (patch) | |
tree | fb1aeb8880e0ac391c0bcd9c9a3a3db3e465ca72 /lib | |
parent | 8733ff6e11836be5991e6b9b771c29cf198333f0 (diff) | |
download | src-8e60ce996b14d8d41112ad374e3b2d6fc02b6823.tar.gz src-8e60ce996b14d8d41112ad374e3b2d6fc02b6823.zip |
clear lock to zero state if it is destroyed.
Notes
Notes:
svn path=/head/; revision=211859
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libthr/thread/thr_rtld.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_rtld.c b/lib/libthr/thread/thr_rtld.c index 2560a941d3a8..d9041adcfb90 100644 --- a/lib/libthr/thread/thr_rtld.c +++ b/lib/libthr/thread/thr_rtld.c @@ -81,8 +81,11 @@ static void _thr_rtld_lock_destroy(void *lock) { int locki; + size_t i; locki = (struct rtld_lock *)lock - &lock_place[0]; + for (i = 0; i < sizeof(struct rtld_lock); ++i) + ((char *)lock)[i] = 0; busy_places &= ~(1 << locki); } |