Add missing malloc in ftdi_eeprom
authorAndreas Helmcke <ahelmcke@ela-soft.com>
Mon, 12 Dec 2011 14:54:00 +0000 (15:54 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 12 Dec 2011 14:54:00 +0000 (15:54 +0100)
ftdi_eeprom/main.c

index b33266f..74ae7e2 100644 (file)
@@ -346,6 +346,7 @@ int main(int argc, char *argv[])
         {
             if (filename != NULL && strlen(filename) > 0)
             {
+                eeprom_buf = malloc(my_eeprom_size);
                 FILE *fp = fopen(filename, "rb");
                 fread(eeprom_buf, 1, my_eeprom_size, fp);
                 fclose(fp);