Skip to content

Commit f247a78

Browse files
committed
leak [skip ci]
1 parent 351f7ac commit f247a78

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
@@ -1700,7 +1700,9 @@ namespace simplecpp {
17001700
nameTokDef = nametoken;
17011701
variadic = false;
17021702
variadicOpt = false;
1703+
delete optExpandValue;
17031704
optExpandValue = nullptr;
1705+
delete optNoExpandValue;
17041706
optNoExpandValue = nullptr;
17051707
if (!nameTokDef) {
17061708
valueToken = endToken = nullptr;
@@ -2374,8 +2376,8 @@ namespace simplecpp {
23742376
bool variadicOpt;
23752377

23762378
/** Expansion value for varadic macros with __VA_OPT__ expanded and discarded respectively */
2377-
const TokenList *optExpandValue;
2378-
const TokenList *optNoExpandValue;
2379+
const TokenList *optExpandValue = nullptr;
2380+
const TokenList *optNoExpandValue = nullptr;
23792381

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

0 commit comments

Comments
 (0)