diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2005-12-19 05:13:45 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2005-12-19 05:13:45 +0000 |
commit | e4f8c52835283c98aeb37e3a224c13e66fd99f2a (patch) | |
tree | f4af1f6c8d5371844cac3c1f2feaa0b4329ddf51 /lib | |
parent | 693fa5b3c9455ce2ea326b863467141624b6bb30 (diff) |
sanity check for key_delete was missing !
Diffstat (limited to 'lib')
-rw-r--r-- | lib/librthread/rthread_tls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/librthread/rthread_tls.c b/lib/librthread/rthread_tls.c index 4adbbcb6c54..be4e8346fbc 100644 --- a/lib/librthread/rthread_tls.c +++ b/lib/librthread/rthread_tls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_tls.c,v 1.6 2005/12/18 01:35:06 tedu Exp $ */ +/* $OpenBSD: rthread_tls.c,v 1.7 2005/12/19 05:13:44 tedu Exp $ */ /* * Copyright (c) 2004 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -72,7 +72,7 @@ int pthread_key_delete(pthread_key_t key) { - if (rkeys[key].used) + if (!rkeys[key].used) return (EINVAL); _spinlock(&rkeyslock); |