*/
void ftdi_eeprom_free(struct ftdi_context *ftdi)
{
- struct ftdi_eeprom *eeprom;
if (!ftdi)
return;
if (ftdi->eeprom)
- return;
-
- eeprom = ftdi->eeprom;
+ {
+ struct ftdi_eeprom *eeprom = ftdi->eeprom;
- if (eeprom->manufacturer != 0) {
- free(eeprom->manufacturer);
- eeprom->manufacturer = 0;
- }
- if (eeprom->product != 0) {
- free(eeprom->product);
- eeprom->product = 0;
- }
- if (eeprom->serial != 0) {
- free(eeprom->serial);
- eeprom->serial = 0;
+ if (eeprom->manufacturer != 0) {
+ free(eeprom->manufacturer);
+ eeprom->manufacturer = 0;
+ }
+ if (eeprom->product != 0) {
+ free(eeprom->product);
+ eeprom->product = 0;
+ }
+ if (eeprom->serial != 0) {
+ free(eeprom->serial);
+ eeprom->serial = 0;
+ }
}
}