Prevent a few test pthread keys from leaking.
Bug: 17358010
Change-Id: Ie718dc215ddfd431650295a1630c1b1716760c3d
diff --git a/tests/pthread_test.cpp b/tests/pthread_test.cpp
index 6557738..bbac7fe 100644
--- a/tests/pthread_test.cpp
+++ b/tests/pthread_test.cpp
@@ -105,6 +105,7 @@
ASSERT_EQ(99, WEXITSTATUS(status));
ASSERT_EQ(expected, pthread_getspecific(key));
+ ASSERT_EQ(0, pthread_key_delete(key));
}
static void* DirtyKeyFn(void* key) {
@@ -132,6 +133,7 @@
ASSERT_EQ(nullptr, result); // Not ~0!
ASSERT_EQ(0, munmap(stack, stack_size));
+ ASSERT_EQ(0, pthread_key_delete(key));
}
static void* IdFn(void* arg) {