shithub: choc

Download patch

ref: 46fb2a7c8c804bb1e131d32e900e408e2e751dbf
parent: 1b95bf7679de60d2d7888c8b13af9743b39a5f73
author: Simon Howard <[email protected]>
date: Wed Apr 9 20:09:15 EDT 2014

pcsound: Fix resouce leak with speaker_handle.

speaker_handle should be close()d after forking the separate sound
server. This fixes #192 (thanks Edward-san).

--- a/pcsound/pcsound_bsd.c
+++ b/pcsound/pcsound_bsd.c
@@ -237,6 +237,7 @@
         // This is the parent
 
         sound_server_pid = result;
+        close(speaker_handle);
     }
 
     return 1;