[Python-checkins] cpython (merge 3.2 -> default): Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by Thomas

charles-francois.natali python-checkins at python.org
Thu Sep 29 19:48:56 CEST 2011


http://hg.python.org/cpython/rev/d8dc24c4e83d
changeset: 72532:d8dc24c4e83d
parent: 72527:a11970b158f2
parent: 72531:160b52c9e8b3
user: Charles-François Natali <neologix at free.fr>
date: Thu Sep 29 19:49:37 2011 +0200
summary:
 Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by Thomas
Jarosch.
files:
 Misc/ACKS | 1 +
 Misc/NEWS | 3 +++
 Modules/ossaudiodev.c | 1 +
 3 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -463,6 +463,7 @@
 Geert Jansen
 Jack Jansen
 Bill Janssen
+Thomas Jarosch
 Julien Jehannet
 Drew Jenkins
 Flemming Kjær Jensen
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1298,6 +1298,9 @@
 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
--- a/Modules/ossaudiodev.c
+++ b/Modules/ossaudiodev.c
@@ -129,6 +129,7 @@
 }
 
 if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) == -1) {
+ close(fd);
 PyErr_SetFromErrnoWithFilename(PyExc_IOError, devicename);
 return NULL;
 }
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /