Skip to content

Commit cb10c94

Browse files
committed
leak [skip ci]
1 parent bd36309 commit cb10c94

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

simplecpp.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,9 @@ namespace simplecpp {
16931693
nameTokDef = nametoken;
16941694
variadic = false;
16951695
variadicOpt = false;
1696+
delete optExpandValue;
16961697
optExpandValue = nullptr;
1698+
delete optNoExpandValue;
16971699
optNoExpandValue = nullptr;
16981700
if (!nameTokDef) {
16991701
valueToken = endToken = nullptr;
@@ -2367,8 +2369,8 @@ namespace simplecpp {
23672369
bool variadicOpt;
23682370

23692371
/** Expansion value for varadic macros with __VA_OPT__ expanded and discarded respectively */
2370-
const TokenList *optExpandValue;
2371-
const TokenList *optNoExpandValue;
2372+
const TokenList *optExpandValue = nullptr;
2373+
const TokenList *optNoExpandValue = nullptr;
23722374

23732375
/** was the value of this macro actually defined in the code? */
23742376
bool valueDefinedInCode_;

0 commit comments

Comments
 (0)