Fix memory leaks in the config parser.

This commit is contained in:
Gunnar Beutner 2013-09-18 07:46:07 +02:00
parent 2ed8f1aaa7
commit 9d0fee73a3
2 changed files with 334 additions and 288 deletions

File diff suppressed because it is too large Load Diff

View File

@ -571,34 +571,58 @@ constexpression: T_STRING
$$ = new Value((String)*$1 + (String)*$3);
else
$$ = new Value((double)*$1 + (double)*$3);
delete $1;
delete $3;
}
| constexpression '-' constexpression
{
$$ = new Value((double)*$1 - (double)*$3);
delete $1;
delete $3;
}
| constexpression '*' constexpression
{
$$ = new Value((double)*$1 * (double)*$3);
delete $1;
delete $3;
}
| constexpression '/' constexpression
{
$$ = new Value((double)*$1 / (double)*$3);
delete $1;
delete $3;
}
| constexpression '&' constexpression
{
$$ = new Value((long)*$1 & (long)*$3);
delete $1;
delete $3;
}
| constexpression '|' constexpression
{
$$ = new Value((long)*$1 | (long)*$3);
delete $1;
delete $3;
}
| constexpression T_SHIFT_LEFT constexpression
{
$$ = new Value((long)*$1 << (long)*$3);
delete $1;
delete $3;
}
| constexpression T_SHIFT_RIGHT constexpression
{
$$ = new Value((long)*$1 >> (long)*$3);
delete $1;
delete $3;
}
| '(' constexpression ')'
{