[LITE]Fix array leak during resize o/p

This commit is contained in:
Siju 2019-07-03 10:14:29 +05:30 committed by GitHub
parent e0ab930a7e
commit 57f1af3b8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,7 @@ TfLiteStatus ResizeOutputImpl(TfLiteContext* context, const TfLiteTensor* dims,
for (int i = 0; i < output_shape->size; ++i) {
T data = GetTensorData<T>(dims)[i];
if (data < 0) {
TfLiteIntArrayFree(output_shape);
context->ReportError(context, "Fill dimensions must be >= 0", dims->type);
return kTfLiteError;
}