git://developer.intra2net.com
/
libftdi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
fcf62aa
)
Don't crash in ftdi_eeprom_free() if eeprom is unallocated/already freed
author
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Fri, 25 Jun 2010 15:38:18 +0000 (17:38 +0200)
committer
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Fri, 25 Jun 2010 15:38:18 +0000 (17:38 +0200)
src/ftdi.c
patch
|
blob
|
blame
|
history
diff --git
a/src/ftdi.c
b/src/ftdi.c
index
4d10b73
..
2db8d32
100644
(file)
--- a/
src/ftdi.c
+++ b/
src/ftdi.c
@@
-2138,6
+2138,9
@@
void ftdi_eeprom_initdefaults(struct ftdi_eeprom *eeprom)
*/
void ftdi_eeprom_free(struct ftdi_eeprom *eeprom)
{
+ if (!eeprom)
+ return;
+
if (eeprom->manufacturer != 0) {
free(eeprom->manufacturer);
eeprom->manufacturer = 0;