Menu

#363 Forgetting to free the allocated memory of `snd_device_name_get_hint()` can cause memory leak

Future
closed
nobody
None
na
2025-07-01
2021-04-08
Arya Lee
No

According to the ALSA library document, we should free the return value of snd_device_name_get_hint() after use. Otherwise, it will cause the memory leak.

The return value should be freed when no longer needed.

In file plugins/audio_alsa.c, name in L547 and desc in L549 should be freed. We can simply use free().

Discussion

  • Sean Young

    Sean Young - 2025-07-01
    • status: open --> closed
     
  • Sean Young

    Sean Young - 2025-07-01

    Fixed in commit aaf355e02b13c717e077f4b4efad2f86e5880276

     

Log in to post a comment.