Fixed a memory leak

### Description
Freeing parsed data in case of an error in tenant name.