commit | 564f89036fbecfc03ca4152e9de8b291887111a4 | [log] [tgz] |
---|---|---|
author | Charles-François Natali <neologix@free.fr> | Thu Sep 29 19:43:01 2011 +0200 |
committer | Charles-François Natali <neologix@free.fr> | Thu Sep 29 19:43:01 2011 +0200 |
tree | 79fc3930acce9946fcdd68b6c998684988386f2d | |
parent | 169fa9345dc10ca631464e77352539397b095875 [diff] [blame] |
Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by Thomas Jarosch.
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 @@ } if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) == -1) { + close(fd); PyErr_SetFromErrnoWithFilename(PyExc_IOError, devicename); return NULL; }