Nit: Checking non-null-ness before calling free is redundant.
PiperOrigin-RevId: 275928941 Change-Id: I972b985befab605153103e17297de23441f2e51c
This commit is contained in:
parent
671f83aefe
commit
54343f1433
@ -86,7 +86,7 @@ TfLiteFloatArray* TfLiteFloatArrayCreate(int size) {
|
||||
void TfLiteFloatArrayFree(TfLiteFloatArray* a) { free(a); }
|
||||
|
||||
void TfLiteTensorDataFree(TfLiteTensor* t) {
|
||||
if (t->allocation_type == kTfLiteDynamic && t->data.raw) {
|
||||
if (t->allocation_type == kTfLiteDynamic) {
|
||||
free(t->data.raw);
|
||||
}
|
||||
t->data.raw = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user