clear lock to zero state if it is destroyed.

This commit is contained in:
David Xu 2010-08-27 03:23:07 +00:00
parent 8733ff6e11
commit 8e60ce996b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211859

View File

@ -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);
}