summaryrefslogtreecommitdiff
path: root/libavfilter/dnn
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-10 02:59:47 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-11 12:34:17 +0100
commit0e078c6cfa078475517cc07a500032a42a523587 (patch)
tree6616b1080fb4e7cd97e6c61e4adff58ecc99cf9a /libavfilter/dnn
parent2e2ed39dac9578862fb37d74e44cf4cf92c9b4bd (diff)
dnn/dnn_backend_native: Fix leak in case parsing options fails
Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavfilter/dnn')
-rw-r--r--libavfilter/dnn/dnn_backend_native.c2
1 files changed, 1 insertions, 1 deletions
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