mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
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>
This commit is contained in:
parent
2e2ed39dac
commit
0e078c6cfa
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user