Free() checks if its argument in NULL. There is no need for the caller to
do the same.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
perror:
flash_perror(rc);
done:
- if (saved_data)
- free(saved_data);
+ free(saved_data);
/* try to re-protect */
flash_sect_protect(1, (ulong)flash_addr, end_addr);
flash_sect_protect(1, (ulong)flash_addr_new, end_addr_new);
perror:
flash_perror(rc);
done:
- if (saved_data)
- free(saved_data);
+ free(saved_data);
/* try to re-protect */
flash_sect_protect(1, (long)flash_addr, end_addr);
return rc;