]> git.sesse.net Git - ffmpeg/commit
avcodec/ljpegenc: Don't free buffer known to be NULL
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 15 Sep 2020 00:09:42 +0000 (02:09 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 19 Sep 2020 16:47:54 +0000 (18:47 +0200)
commit6015a6921eba7b01b1e23ebd46f0f9f14b6c6f7b
treeae8c6a7600ab7f23318b5a41eae0ee9fa58b4d91
parent3d83de4187e9bb07af2ea8a0ec071094fca7a500
avcodec/ljpegenc: Don't free buffer known to be NULL

The lossless JPEG encoder allocates one buffer in its init function
and freeing said buffer is the only thing done in its close function.
Despite this the init function called the close function if allocating
said buffer fails, although there is nothing to free in this case.
This commit stops doing this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/ljpegenc.c