[FFmpeg-devel] [PATCH] ffserver: Fix memory leak and uncheked av_strdup return

Derek Buitenhuis derek.buitenhuis at gmail.com
Sun Nov 22 19:14:31 CET 2015

On 11/22/2015 6:09 PM, Hendrik Leppkes wrote:
> I'm slightly confused by this. If the API doesn't take over the value,
> then you don't need to strdup it, and if it does, you don't need to
> free it?

I don't know about the existing code, I just made sure not to leak after
av_strdup, since:

    Pointer to a newly-allocated string containing a copy of s or NULL if the string cannot be allocated.

- Derek

More information about the ffmpeg-devel mailing list