Skip to content

Commit 399f336

Browse files
committed
leak [skip ci]
1 parent e5c27ad commit 399f336

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
@@ -1702,7 +1702,9 @@ namespace simplecpp {
17021702
nameTokDef = nametoken;
17031703
variadic = false;
17041704
variadicOpt = false;
1705+
delete optExpandValue;
17051706
optExpandValue = nullptr;
1707+
delete optNoExpandValue;
17061708
optNoExpandValue = nullptr;
17071709
if (!nameTokDef) {
17081710
valueToken = endToken = nullptr;
@@ -2376,8 +2378,8 @@ namespace simplecpp {
23762378
bool variadicOpt;
23772379

23782380
/** Expansion value for varadic macros with __VA_OPT__ expanded and discarded respectively */
2379-
const TokenList *optExpandValue;
2380-
const TokenList *optNoExpandValue;
2381+
const TokenList *optExpandValue = nullptr;
2382+
const TokenList *optNoExpandValue = nullptr;
23812383

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

0 commit comments

Comments
 (0)