[FFmpeg-cvslog] dnn/dnn_backend_native: Fix leak in case parsing options fails
Andreas Rheinhardt
git at videolan.org
Thu Mar 11 15:04:50 EET 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Wed Mar 10 02:59:47 2021 +0100| [0e078c6cfa078475517cc07a500032a42a523587] | committer: Andreas Rheinhardt
dnn/dnn_backend_native: Fix leak in case parsing options fails
Reviewed-by: Guo, Yejun <yejun.guo at intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e078c6cfa078475517cc07a500032a42a523587
---
libavfilter/dnn/dnn_backend_native.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/dnn/dnn_backend_native.c b/libavfilter/dnn/dnn_backend_native.c
index 93fa6c6bcf..828dcf8b37 100644
--- a/libavfilter/dnn/dnn_backend_native.c
+++ b/libavfilter/dnn/dnn_backend_native.c
@@ -158,12 +158,12 @@ DNNModel *ff_dnn_load_model_native(const char *model_filename, DNNFunctionType f
if (!native_model){
goto fail;
}
+ model->model = native_model;
native_model->ctx.class = &dnn_native_class;
model->options = options;
if (av_opt_set_from_string(&native_model->ctx, model->options, NULL, "=", "&") < 0)
goto fail;
- model->model = (void *)native_model;
native_model->model = model;
#if !HAVE_PTHREAD_CANCEL
More information about the ffmpeg-cvslog
mailing list