diff options
author | Zhao Zhili <zhilizhao@tencent.com> | 2023-09-02 16:23:55 +0800 |
---|---|---|
committer | Guo Yejun <yejun.guo@intel.com> | 2023-09-15 13:02:15 +0800 |
commit | e0880ef8cb5f92d1c2acb951477d04cb782a6705 (patch) | |
tree | 5b2dca9a5088d21f0418764d397e0c4afbf86f6f | |
parent | 7cb632929614677adf96c75331a4af93b245628c (diff) | |
download | ffmpeg-e0880ef8cb5f92d1c2acb951477d04cb782a6705.tar.gz |
avfilter/dnn_backend_openvino: fix use uninitialized values
Error handling was broken since neither `ret` nor `task` has being
initialized on error path.
-rw-r--r-- | libavfilter/dnn/dnn_backend_openvino.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index 85db4ecd35..7150bf0886 100644 --- a/libavfilter/dnn/dnn_backend_openvino.c +++ b/libavfilter/dnn/dnn_backend_openvino.c @@ -1090,37 +1090,37 @@ static int get_output_ov(void *model, const char *input_name, int input_width, i status = ov_partial_shape_create(4, dims, &partial_shape); if (status != OK) { av_log(ctx, AV_LOG_ERROR, "Failed create partial shape.\n"); - goto err; + return ov2_map_error(status, NULL); } status = ov_const_port_get_shape(ov_model->input_port, &input_shape); input_shape.dims[2] = input_height; input_shape.dims[3] = input_width; if (status != OK) { av_log(ctx, AV_LOG_ERROR, "Failed create shape for model input resize.\n"); - goto err; + return ov2_map_error(status, NULL); } status = ov_shape_to_partial_shape(input_shape, &partial_shape); if (status != OK) { av_log(ctx, AV_LOG_ERROR, "Failed create partial shape for model input resize.\n"); - goto err; + return ov2_map_error(status, NULL); } status = ov_model_reshape_single_input(ov_model->ov_model, partial_shape); if (status != OK) { av_log(ctx, AV_LOG_ERROR, "Failed to reszie model input.\n"); - goto err; + return ov2_map_error(status, NULL); } } else { avpriv_report_missing_feature(ctx, "Do not support dynamic model."); - goto err; + return AVERROR(ENOTSUP); } } status = ov_model_const_output_by_name(ov_model->ov_model, output_name, &ov_model->output_port); if (status != OK) { av_log(ctx, AV_LOG_ERROR, "Failed to get output port.\n"); - goto err; + return ov2_map_error(status, NULL); } if (!ov_model->compiled_model) { #else |