Commit 86e47ae8 authored by Ben Boeckel's avatar Ben Boeckel

vtkParsePreprocess: fix up some free() logic for params

Change-Id: I8adb6a719114b76d8a3c6647613db7252a2b2cf5
parent 8aa578f3
......@@ -1402,7 +1402,7 @@ static int preproc_evaluate_define(
{
if (tokens->tok != TOK_ID && tokens->tok != TOK_ELLIPSIS)
{
if (params) { free((char **)params); }
free((char **)params);
#if PREPROC_DEBUG
fprintf(stderr, "syntax error %d\n", __LINE__);
#endif
......@@ -1439,7 +1439,7 @@ static int preproc_evaluate_define(
}
else if (tokens->tok != ')')
{
if (params) { free((char **)params); }
free((char **)params);
#if PREPROC_DEBUG
fprintf(stderr, "syntax error %d\n", __LINE__);
#endif
......@@ -1457,11 +1457,11 @@ static int preproc_evaluate_define(
macro = *macro_p;
if (macro)
{
free((char **)params);
if (preproc_identical(macro->Definition, definition))
{
return VTK_PARSE_OK;
}
if (params) { free((char **)params); }
#if PREPROC_DEBUG
fprintf(stderr, "macro redefined %d\n", __LINE__);
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment