Merged DB file parser fix from 3.14, revno 12605
This commit is contained in:
@@ -73,15 +73,20 @@ static int yyreset(void)
|
||||
{whitespace} ;
|
||||
|
||||
{doublequote}({stringchar}|{escape})*{newline} { /* bad string */
|
||||
yyerror("Newline in string, closing quote missing");
|
||||
yyerrorAbort("Newline in string, closing quote missing");
|
||||
}
|
||||
|
||||
. {
|
||||
char message[40];
|
||||
YY_BUFFER_STATE *dummy=0;
|
||||
|
||||
sprintf(message,"Invalid character '%c'",yytext[0]);
|
||||
yyerror(message);
|
||||
if (isprint((int) yytext[0])) {
|
||||
sprintf(message, "Invalid character '%c'", yytext[0]);
|
||||
}
|
||||
else {
|
||||
sprintf(message, "Invalid character 0x%2.2x", yytext[0]);
|
||||
}
|
||||
yyerrorAbort(message);
|
||||
/*The following suppresses compiler warning messages*/
|
||||
if(FALSE) yyunput('c',(unsigned char *) message);
|
||||
if(FALSE) yy_switch_to_buffer(*dummy);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
/*The routines in this module are serially reusable NOT reentrant*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <epicsStdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -604,7 +604,10 @@ DBENTRY * dbAllocEntry(dbBase *pdbbase)
|
||||
|
||||
void dbFreeEntry(DBENTRY *pdbentry)
|
||||
{
|
||||
if(pdbentry->message) free((void *)pdbentry->message);
|
||||
if (!pdbentry)
|
||||
return;
|
||||
if (pdbentry->message)
|
||||
free((void *)pdbentry->message);
|
||||
dbmfFree(pdbentry);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user