Unified · Split
| @@ -141,12 +141,14 @@ static DNNReturnType fill_model_input_ov(OVModel *ov_model, RequestItem *request · 140 unmodified lines | ||
| 141 | 141 | status |= ie_blob_get_dims(input_blob, &dims); |
| 142 | 142 | status |= ie_blob_get_precision(input_blob, &precision); |
| 143 | 143 | if (status != OK) { |
| 144 | + ie_blob_free(&input_blob); | |
| 144 | 145 | av_log(ctx, AV_LOG_ERROR, "Failed to get input blob dims/precision\n"); |
| 145 | 146 | return DNN_ERROR; |
| 146 | 147 | } |
| 147 | 148 | |
| 148 | 149 | status = ie_blob_get_buffer(input_blob, &blob_buffer); |
| 149 | 150 | if (status != OK) { |
| 151 | + ie_blob_free(&input_blob); | |
| 150 | 152 | av_log(ctx, AV_LOG_ERROR, "Failed to get input blob buffer\n"); |
| 151 | 153 | return DNN_ERROR; |
| 152 | 154 | } |
| @@ -211,6 +213,7 @@ static void infer_completion_callback(void *args) · 58 unmodified lines | ||
| 211 | 213 | |
| 212 | 214 | status = ie_blob_get_buffer(output_blob, &blob_buffer); |
| 213 | 215 | if (status != OK) { |
| 216 | + ie_blob_free(&output_blob); | |
| 214 | 217 | av_log(ctx, AV_LOG_ERROR, "Failed to access output memory\n"); |
| 215 | 218 | return; |
| 216 | 219 | } |
| @@ -218,6 +221,7 @@ static void infer_completion_callback(void *args) · 1 unmodified line | ||
| 218 | 221 | status |= ie_blob_get_dims(output_blob, &dims); |
| 219 | 222 | status |= ie_blob_get_precision(output_blob, &precision); |
| 220 | 223 | if (status != OK) { |
| 224 | + ie_blob_free(&output_blob); | |
| 221 | 225 | av_log(ctx, AV_LOG_ERROR, "Failed to get dims or precision of output\n"); |
| 222 | 226 | return; |
| 223 | 227 | } |