mirror of https://github.com/FFmpeg/FFmpeg.git
The earlier version did not error out directly in case an error happens, because it would lead to a leak: An allocated array is only reachable via a local variable at that time; it is only attached to more permanent storage at the end. While it would be possible to add custom code for freeing on error (instead of reusing the ordinary code for doing so), this commit takes the opposite approach and attaches the newly allocated array to its permanent place immediately after its allocation. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>pull/352/head
parent
bd076cacc3
commit
4656c1771b
1 changed files with 4 additions and 3 deletions
Loading…
Reference in new issue