Fixed another memory leak, when define an operation more than once; also fixed the conf.in-file

(This might need to be reworked when avr parts can have parents.) 


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1023 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Rene Liebscher 2011-12-17 17:00:51 +00:00
parent a84a97cadf
commit f83447928d
2 changed files with 12 additions and 10 deletions

View File

@ -6477,16 +6477,6 @@ part
" 0 0 0 0 0 a2 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 x x x x x a8",
" a7 a6 a5 a4 a3 0 0 0",
" x x x x x x x x";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 a2 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 x x x a10 a9 a8",
" a7 a6 a5 a4 a3 0 0 0",

View File

@ -1153,6 +1153,12 @@ part_parm :
opnum = which_opcode($1);
op = avr_new_opcode();
parse_cmdbits(op);
if (current_part->op[opnum] != NULL) {
fprintf(stderr,
"%s: warning at %s:%d: operation redefined\n",
progname, infile, lineno);
free(current_part->op[opnum]);
}
current_part->op[opnum] = op;
free_token($1);
@ -1274,6 +1280,12 @@ mem_spec :
opnum = which_opcode($1);
op = avr_new_opcode();
parse_cmdbits(op);
if (current_mem->op[opnum] != NULL) {
fprintf(stderr,
"%s: warning at %s:%d: operation redefined\n",
progname, infile, lineno);
free(current_mem->op[opnum]);
}
current_mem->op[opnum] = op;
free_token($1);