Page MenuHomeFreeBSD

sound: Fix memory leak in chn_init()
ClosedPublic

Authored by christos on Jul 15 2024, 3:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 25, 6:40 AM
Unknown Object (File)
Mon, May 25, 6:19 AM
Unknown Object (File)
Mon, May 25, 5:51 AM
Unknown Object (File)
Thu, May 21, 1:39 PM
Unknown Object (File)
Sun, May 17, 8:06 PM
Unknown Object (File)
Thu, Apr 30, 10:15 AM
Unknown Object (File)
Apr 20 2026, 2:00 AM
Unknown Object (File)
Apr 20 2026, 2:00 AM
Subscribers

Details

Summary

In case chn_init() fails, we are leaking memory by not freeing the
feeder.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jul 19 2024, 12:01 AM
markj added inline comments.
sys/dev/sound/pcm/channel.c
1369

Since this strange-looking while loop appears in several places now, it would a good idea to move it into a subroutine.

sys/dev/sound/pcm/channel.c
1369

Maybe it's better to just modify the function directly?

sys/dev/sound/pcm/channel.c
1369

That works too.

christos added inline comments.
sys/dev/sound/pcm/channel.c
1369
This revision was automatically updated to reflect the committed changes.
christos marked an inline comment as done.