summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorCharles-François Natali <neologix@free.fr>2011-09-29 17:43:01 (GMT)
committerCharles-François Natali <neologix@free.fr>2011-09-29 17:43:01 (GMT)
commit564f89036fbecfc03ca4152e9de8b291887111a4 (patch)
tree79fc3930acce9946fcdd68b6c998684988386f2d /Modules
parent169fa9345dc10ca631464e77352539397b095875 (diff)
downloadcpython-564f89036fbecfc03ca4152e9de8b291887111a4.zip
cpython-564f89036fbecfc03ca4152e9de8b291887111a4.tar.gz
cpython-564f89036fbecfc03ca4152e9de8b291887111a4.tar.bz2
Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by Thomas
Jarosch.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/ossaudiodev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c
index b3dfa62..647a21e 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;
}