Free allocated memory when returning error in aaruf_read_sector_long().

This commit is contained in:
2022-10-12 16:21:25 +01:00
parent 7db52bbe66
commit 8b90c00ca7

View File

@@ -315,7 +315,11 @@ int32_t aaruf_read_sector_long(void* context, uint64_t sectorAddress, uint8_t* d
res = aaruf_read_sector(context, sectorAddress, bareData, &bareLength);
if(res < AARUF_STATUS_OK) return res;
if(res < AARUF_STATUS_OK)
{
free(bareData);
return res;
}
trkFound = false;