aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/librsvgdec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-07-25 13:05:06 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-18 01:35:43 +0200
commit4656c1771b4ac12d9df9812390551f32fda181bc (patch)
tree9a00cdac993c38cccff62467f7b688e79a088e70 /libavcodec/librsvgdec.c
parentbd076cacc313b19e5af895df6d332aa48c33cf2a (diff)
downloadffmpeg-4656c1771b4ac12d9df9812390551f32fda181bc.tar.gz
avcodec/smacker: Directly goto error in case of error
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>
Diffstat (limited to 'libavcodec/librsvgdec.c')
0 files changed, 0 insertions, 0 deletions