sound: fix a memory leak bug