[LITE]Fix array leak during resize o/p
This commit is contained in:
parent
e0ab930a7e
commit
57f1af3b8b
@ -38,6 +38,7 @@ TfLiteStatus ResizeOutputImpl(TfLiteContext* context, const TfLiteTensor* dims,
|
|||||||
for (int i = 0; i < output_shape->size; ++i) {
|
for (int i = 0; i < output_shape->size; ++i) {
|
||||||
T data = GetTensorData<T>(dims)[i];
|
T data = GetTensorData<T>(dims)[i];
|
||||||
if (data < 0) {
|
if (data < 0) {
|
||||||
|
TfLiteIntArrayFree(output_shape);
|
||||||
context->ReportError(context, "Fill dimensions must be >= 0", dims->type);
|
context->ReportError(context, "Fill dimensions must be >= 0", dims->type);
|
||||||
return kTfLiteError;
|
return kTfLiteError;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user