mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
decode: avoid leaks on failure in ff_get_buffer()
If the get_buffer() call fails, the frame might have some side data already set. Make sure it gets freed. Merges Libav commit de77671438c24ffea93398c8dc885d4dd04477de. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
195dd5c59c
commit
4776c61424
@ -1598,6 +1598,9 @@ end:
|
||||
frame->height = avctx->height;
|
||||
}
|
||||
|
||||
if (ret < 0)
|
||||
av_frame_unref(frame);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user