Skip to content

Commit 5226df8

Browse files
[2.0>master] [MERGE #2937 @navidR] Fixing uninitialized pointer freeing in ArgInfo deconstructor
Merge pull request #2937 from navidR:release/2.0 Fixes #2932
2 parents e4d982c + ba2fd5e commit 5226df8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

bin/ch/ChakraRtInterface.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,22 @@ class ChakraRTInterface
196196
HostPrintUsageFuncPtr hostPrintUsage;
197197
char* filename;
198198

199+
ArgInfo() :
200+
argc(0),
201+
argv(nullptr),
202+
hostPrintUsage(nullptr),
203+
filename(nullptr)
204+
{
205+
}
206+
207+
ArgInfo(int argc, LPWSTR* argv, HostPrintUsageFuncPtr hostPrintUsage, char* filename) :
208+
argc(argc),
209+
argv(argv),
210+
hostPrintUsage(hostPrintUsage),
211+
filename(filename)
212+
{
213+
}
214+
199215
~ArgInfo()
200216
{
201217
if (filename != nullptr)

0 commit comments

Comments
 (0)