]> git.sesse.net Git - ffmpeg/commit
avformat/segment: Fix leak of string on error
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 5 Sep 2020 19:22:21 +0000 (21:22 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 10 Sep 2020 11:44:12 +0000 (13:44 +0200)
commit3152a2a218578ad3c024dcd7d4ced06b396d30e1
tree279ecabd61189bf4a0761330db3ca89808a3a4da
parent936d967871562e36e307126b59e4e6bbb3a3bab7
avformat/segment: Fix leak of string on error

A string containing the segment's filename that the segment muxer
allocates got only freed in its write_trailer function. This implies
that it leaks if write_trailer is never called, e.g. if initializing
the child muxer fails. This commit fixes this by freeing the string
in the deinit function instead.

Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/segment.c