From: Fred Drake Date: Fri, 9 Nov 2001 16:00:41 +0000 (+0000) Subject: Fix memory leak. This is part of SF patch #478006. X-Git-Tag: v2.2.1c1~822 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=03459a5cd776eb5d3c7e427d4007dc1f983975b5;p=thirdparty%2FPython%2Fcpython.git Fix memory leak. This is part of SF patch #478006. --- diff --git a/Modules/sunaudiodev.c b/Modules/sunaudiodev.c index 7bf867bcb2b9..e4c4c9f42aa3 100644 --- a/Modules/sunaudiodev.c +++ b/Modules/sunaudiodev.c @@ -103,6 +103,7 @@ newsadobject(PyObject *args) } if (fd < 0) { PyErr_SetFromErrnoWithFilename(SunAudioError, opendev); + PyMem_DEL(ctldev); return NULL; } PyMem_DEL(ctldev); diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 0fbafdafc708..6c2bbfd3e747 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -200,7 +200,7 @@ PyThread_start_new_thread(void (*func)(void *), void *arg) /* Restore signal mask for original thread */ SET_THREAD_SIGMASK(SIG_SETMASK, &oldmask, NULL); -#ifdef THREAD_STACK_SIZE +#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED) pthread_attr_destroy(&attrs); #endif if (success == 0) {