diff options
author | Charles-François Natali <neologix@free.fr> | 2011-09-29 17:46:37 (GMT) |
---|---|---|
committer | Charles-François Natali <neologix@free.fr> | 2011-09-29 17:46:37 (GMT) |
commit | 5a4a1096949335736ccad2b102fd91ebdd2e25b0 (patch) | |
tree | 8fada4a76209c59a71265db0fb92fc6fcc236968 | |
parent | b86ecf4bd1bfe237fbaa7ac8098af76141b5caf1 (diff) | |
download | cpython-5a4a1096949335736ccad2b102fd91ebdd2e25b0.zip cpython-5a4a1096949335736ccad2b102fd91ebdd2e25b0.tar.gz cpython-5a4a1096949335736ccad2b102fd91ebdd2e25b0.tar.bz2 |
Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by Thomas
Jarosch.
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Modules/ossaudiodev.c | 1 |
3 files changed, 5 insertions, 0 deletions
@@ -436,6 +436,7 @@ Bertrand Janin Geert Jansen Jack Jansen Bill Janssen +Thomas Jarosch Drew Jenkins Flemming Kjær Jensen MunSic Jeong @@ -82,6 +82,9 @@ Tests Extension Modules ----------------- +- Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by + Thomas Jarosch. + - Issue #13013: ctypes: Fix a reference leak in PyCArrayType_from_ctype. Thanks to Suman Saha for finding the bug and providing a patch. diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c index cdf6beb..b38ce52 100644 --- a/Modules/ossaudiodev.c +++ b/Modules/ossaudiodev.c @@ -129,6 +129,7 @@ newossobject(PyObject *arg) } if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) == -1) { + close(fd); PyErr_SetFromErrnoWithFilename(PyExc_IOError, devicename); return NULL; } |