$OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.3 2007/07/18 15:09:52 kurt Exp $
--- hotspot/src/os/bsd/vm/os_bsd.cpp.orig	Wed Jul 18 10:56:29 2007
+++ hotspot/src/os/bsd/vm/os_bsd.cpp	Wed Jul 18 10:56:32 2007
@@ -344,7 +344,9 @@ props_md_t* os::get_system_properties() {
 #define malloc(n) (char*)NEW_C_HEAP_ARRAY(char, (n))
 #define getenv(n) ::getenv(n)
 
+#ifndef DEFAULT_LD_LIBRARY_PATH
 #define DEFAULT_LD_LIBRARY_PATH "/usr/lib" /* See ld.so.1(1) */
+#endif
 #define EXTENSIONS_DIR "/lib/ext"
 #define ENDORSED_DIR "/lib/endorsed"
 
@@ -710,6 +712,7 @@ bool os::create_thread(Thread* thread, ThreadType thr_
   osthread->set_thread_id(NULL);
 
   status = pthread_create(&tid, &tattr, _start, thread);
+  pthread_attr_destroy(&tattr);
   if (status != 0) {
 err:
     if (PrintMiscellaneous && (Verbose || WizardMode)) {
