cpython (3.2): Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by Thomas
http://hg.python.org/cpython/rev/160b52c9e8b3 changeset: 72531:160b52c9e8b3 branch: 3.2 parent: 72473:58a75eeb5c8e user: Charles-François Natali <neologix@free.fr> date: Thu Sep 29 19:46: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 @@ -436,6 +436,7 @@ Geert Jansen Jack Jansen Bill Janssen +Thomas Jarosch Drew Jenkins Flemming Kjær Jensen MunSic Jeong diff --git a/Misc/NEWS b/Misc/NEWS --- a/Misc/NEWS +++ b/Misc/NEWS @@ -82,6 +82,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
participants (1)
-
charles-francois.natali