Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5a4a109

Browse files
author
Charles-François Natali
committed
Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by Thomas
Jarosch.
1 parent b86ecf4 commit 5a4a109

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ Bertrand Janin
436436
Geert Jansen
437437
Jack Jansen
438438
Bill Janssen
439+
Thomas Jarosch
439440
Drew Jenkins
440441
Flemming Kjær Jensen
441442
MunSic Jeong

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ Tests
8282
Extension Modules
8383
-----------------
8484

85+
- Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by
86+
Thomas Jarosch.
87+
8588
- Issue #13013: ctypes: Fix a reference leak in PyCArrayType_from_ctype.
8689
Thanks to Suman Saha for finding the bug and providing a patch.
8790

Modules/ossaudiodev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ newossobject(PyObject *arg)
129129
}
130130

131131
if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) == -1) {
132+
close(fd);
132133
PyErr_SetFromErrnoWithFilename(PyExc_IOError, devicename);
133134
return NULL;
134135
}

0 commit comments

Comments
 (0)