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 cdf6beb..b38ce52 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;
     }