Skip to content

Commit

Permalink
Issue python#13058: ossaudiodev: fix a file descriptor leak on error.…
Browse files Browse the repository at this point in the history
… Patch by Thomas

Jarosch.
  • Loading branch information
Charles-François Natali committed Sep 29, 2011
2 parents a0702ab + 5a4a109 commit 9624a76
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ Bertrand Janin
Geert Jansen
Jack Jansen
Bill Janssen
Thomas Jarosch
Julien Jehannet
Drew Jenkins
Flemming Kjær Jensen
Expand Down
3 changes: 3 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,9 @@ Tools/Demos
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.

Expand Down
1 change: 1 addition & 0 deletions Modules/ossaudiodev.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ newossobject(PyObject *arg)
}

if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) == -1) {
close(fd);
PyErr_SetFromErrnoWithFilename(PyExc_IOError, devicename);
return NULL;
}
Expand Down

0 comments on commit 9624a76

Please sign in to comment.