diff options
author | Charles-François Natali <neologix@free.fr> | 2011-09-29 17:43:01 (GMT) |
---|---|---|
committer | Charles-François Natali <neologix@free.fr> | 2011-09-29 17:43:01 (GMT) |
commit | 564f89036fbecfc03ca4152e9de8b291887111a4 (patch) | |
tree | 79fc3930acce9946fcdd68b6c998684988386f2d /Modules | |
parent | 169fa9345dc10ca631464e77352539397b095875 (diff) | |
download | cpython-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.c | 1 |
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; } |