mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-13 17:34:56 +00:00
patch #9819: Address several leaks in SVN rev 1429
Submitted by Adrian Klieber git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1435 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
2
config.c
2
config.c
@@ -217,6 +217,7 @@ TOKEN * hexnumber(char * text)
|
||||
tkn->value.number = strtoul(text, &e, 16);
|
||||
if ((e == text) || (*e != 0)) {
|
||||
yyerror("can't scan hex number \"%s\"", text);
|
||||
free_token(tkn);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -244,6 +245,7 @@ TOKEN * string(char * text)
|
||||
tkn->value.string = (char *) malloc(len+1);
|
||||
if (tkn->value.string == NULL) {
|
||||
yyerror("string(): out of memory");
|
||||
free_token(tkn);
|
||||
return NULL;
|
||||
}
|
||||
strcpy(tkn->value.string, text);
|
||||
|
||||
Reference in New Issue
Block a user