You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avfilter/vf_lut3d: fix leak if allocate_3dlut failed
In parse_cinespace(), memory allocated in in_prelut[] and out_prelut[] would leak if allocate_3dlut() failed. Replace return ret with goto end to free memory before return error code. Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
40a3d35da6
commit
a17596f55b
@ -1006,7 +1006,7 @@ static int parse_cinespace(AVFilterContext *ctx, FILE *f)
|
||||
|
||||
ret = allocate_3dlut(ctx, size, prelut);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
goto end;
|
||||
|
||||
for (int k = 0; k < size; k++) {
|
||||
for (int j = 0; j < size; j++) {
|
||||
|
Reference in New Issue
Block a user