mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by Thomas
Jarosch.
This commit is contained in:
commit
9624a764ff
3 changed files with 5 additions and 0 deletions
|
@ -129,6 +129,7 @@ newossobject(PyObject *arg)
|
|||
}
|
||||
|
||||
if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) == -1) {
|
||||
close(fd);
|
||||
PyErr_SetFromErrnoWithFilename(PyExc_IOError, devicename);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue