tests: Small phtread_attr cleanup.
authorRobin Hack <hack.robin@gmail.com>
Fri, 26 Sep 2014 13:25:09 +0000 (15:25 +0200)
committerAndreas Schneider <asn@samba.org>
Mon, 6 Oct 2014 14:16:06 +0000 (16:16 +0200)
This change should make valgrind happy.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
tests/test_glibc_thread_support.c

index 5f1b11da3e8771cc674b4bb4bc3df51e814458a9..f45cd146210ec8801d0e76729b02993c41d04503 100644 (file)
@@ -64,6 +64,8 @@ static void test_syscall_setreuid(void **state)
        for (i = 0; i < NUM_THREADS; i++) {
                pthread_join(threads[i], NULL);
        }
+
+       pthread_attr_destroy(&pthread_custom_attr);
 }
 
 static void *sync_setreuid(void *arg)
@@ -128,6 +130,7 @@ static void test_sync_setreuid(void **state)
                pthread_join(threads[i], NULL);
        }
 
+       pthread_attr_destroy(&pthread_custom_attr);
        free(p);
 }