xiph / ogg

Reference implementation of the Ogg media container
BSD 3-Clause "New" or "Revised" License
345 stars 168 forks source link

Memory leak in test_framing #54

Closed willson-chen closed 5 years ago

willson-chen commented 5 years ago

We call ogg_stream_init() in main() of framing.c, but no ogg_stream_clear() in corresponding. It will cause memory leak.

rillian commented 5 years ago

Thanks. Merged as 1b22b8958cdea300f9a49ef7adb59de57cdc60b0.

I suspect this was old-style C where saving two lines and relying on the kernel to free the allocations on process exit was considered more important than reusable code.

willson-chen commented 5 years ago

a little puzzled. Where to find 1b22b8958cdea300f9a49ef7adb59de57cdc60b0?Thanks @rillian

rillian commented 5 years ago

Sorry, I pushed upstream but the mirroring back to github seems to be broken. I've pushed manually, so it should be available in this repo now.