mirror of
https://github.com/python/cpython.git
synced 2025-11-11 22:55:08 +00:00
Fix memory leak. This is part of SF patch #478006.
This commit is contained in:
parent
f12a68ccd0
commit
03459a5cd7
2 changed files with 2 additions and 1 deletions
|
|
@ -103,6 +103,7 @@ newsadobject(PyObject *args)
|
||||||
}
|
}
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
PyErr_SetFromErrnoWithFilename(SunAudioError, opendev);
|
PyErr_SetFromErrnoWithFilename(SunAudioError, opendev);
|
||||||
|
PyMem_DEL(ctldev);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
PyMem_DEL(ctldev);
|
PyMem_DEL(ctldev);
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,7 @@ PyThread_start_new_thread(void (*func)(void *), void *arg)
|
||||||
/* Restore signal mask for original thread */
|
/* Restore signal mask for original thread */
|
||||||
SET_THREAD_SIGMASK(SIG_SETMASK, &oldmask, NULL);
|
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);
|
pthread_attr_destroy(&attrs);
|
||||||
#endif
|
#endif
|
||||||
if (success == 0) {
|
if (success == 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue