patch #7667: Minor memory handling fixes
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1020 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
7eef860eb1
commit
0efb404152
|
@ -636,12 +636,14 @@ prog_parm :
|
|||
K_USBVID TKN_EQUAL TKN_NUMBER {
|
||||
{
|
||||
current_prog->usbvid = $3->value.number;
|
||||
free_token($3);
|
||||
}
|
||||
} |
|
||||
|
||||
K_USBPID TKN_EQUAL TKN_NUMBER {
|
||||
{
|
||||
current_prog->usbpid = $3->value.number;
|
||||
free_token($3);
|
||||
}
|
||||
} |
|
||||
|
||||
|
@ -672,6 +674,7 @@ prog_parm :
|
|||
K_BAUDRATE TKN_EQUAL TKN_NUMBER {
|
||||
{
|
||||
current_prog->baudrate = $3->value.number;
|
||||
free_token($3);
|
||||
}
|
||||
} |
|
||||
|
||||
|
@ -1292,7 +1295,8 @@ part_parm :
|
|||
K_MEMORY TKN_STRING
|
||||
{
|
||||
current_mem = avr_new_memtype();
|
||||
strcpy(current_mem->desc, strdup($2->value.string));
|
||||
strncpy(current_mem->desc, $2->value.string, AVR_MEMDESCLEN);
|
||||
current_mem->desc[AVR_MEMDESCLEN-1] = 0;
|
||||
free_token($2);
|
||||
}
|
||||
mem_specs
|
||||
|
@ -1458,6 +1462,7 @@ static int assign_pin(int pinno, TOKEN * v, int invert)
|
|||
int value;
|
||||
|
||||
value = v->value.number;
|
||||
free_token(v);
|
||||
|
||||
if ((value <= 0) || (value >= 18)) {
|
||||
fprintf(stderr,
|
||||
|
|
Loading…
Reference in New Issue