[FFmpeg-cvslog] libavfilter/vf_dnn_detect: Set used pointer to NULL

Wenbin Chen git at videolan.org
Fri Dec 15 14:44:06 EET 2023


ffmpeg | branch: master | Wenbin Chen <wenbin.chen at intel.com> | Thu Dec 14 10:49:28 2023 +0800| [22bebfa5e6cfcbd332a387b6f91ae38a4cbaf8b9] | committer: Guo Yejun

libavfilter/vf_dnn_detect: Set used pointer to NULL

Set used pointer to NULL in case it leaks the storage.

Signed-off-by: Wenbin Chen <wenbin.chen at intel.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=22bebfa5e6cfcbd332a387b6f91ae38a4cbaf8b9
---

 libavfilter/vf_dnn_detect.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_dnn_detect.c b/libavfilter/vf_dnn_detect.c
index 5668b8b017..3464af86c8 100644
--- a/libavfilter/vf_dnn_detect.c
+++ b/libavfilter/vf_dnn_detect.c
@@ -223,6 +223,7 @@ static int dnn_detect_parse_yolo_output(AVFrame *frame, DNNData *output, int out
                     av_freep(&bbox);
                     return AVERROR(ENOMEM);
                 }
+                bbox = NULL;
             }
     }
     return 0;



More information about the ffmpeg-cvslog mailing list