1
0
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:
Lidong Yan
2025-06-27 22:09:17 +08:00
committed by Michael Niedermayer
parent 40a3d35da6
commit a17596f55b

View File

@ -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++) {