diff options
author | 2005-12-19 05:13:44 +0000 | |
---|---|---|
committer | 2005-12-19 05:13:44 +0000 | |
commit | 25919e65579681bf5af25cad45010c2b5dd9171d (patch) | |
tree | b233950ad09cc55a1bea77f8dafff9fa4f4d50cf /lib/librthread/rthread_tls.c | |
parent | Grok NORETURN function prototypes in addition to NORETURN function (diff) | |
download | wireguard-openbsd-25919e65579681bf5af25cad45010c2b5dd9171d.tar.xz wireguard-openbsd-25919e65579681bf5af25cad45010c2b5dd9171d.zip |
sanity check for key_delete was missing !
Diffstat (limited to 'lib/librthread/rthread_tls.c')
-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); |