Add av_frame_free() to release frame to avoid potential memory leaks.
Fixes: 5fdb5ed613 ("FATE: add a test for sliced scaling")
Signed-off-by: Jiasheng Jiang <[email protected]>
---
tools/scale_slice_test.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/scale_slice_test.c b/tools/scale_slice_test.c
index 4480bf8569..a6b888090f 100644
--- a/tools/scale_slice_test.c
+++ b/tools/scale_slice_test.c
@@ -157,6 +157,7 @@ int main(int argc, char **argv)
ret = av_frame_get_buffer(frame, 0);
if (ret < 0) {
+ av_frame_free(&frame);
fprintf(stderr, "Error allocating frame data\n");
return ret;
}
@@ -173,6 +174,7 @@ int main(int argc, char **argv)
ret = ds_open(&dc, filename, 0);
if (ret < 0) {
+ av_frame_free(&frame);
fprintf(stderr, "Error opening the file\n");
return ret;
}
--
2.25.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".