Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory leak at CTinyJS::factor() #6

Open
GoogleCodeExporter opened this issue Mar 24, 2015 · 5 comments
Open

memory leak at CTinyJS::factor() #6

GoogleCodeExporter opened this issue Mar 24, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

try {
  /* JSON-style object definition */
  l->match('{');
  while (l->tk != '}') {
    string id = l->tkStr;
    // we only allow strings or IDs on the left hand side of an initialisation
    if (l->tk==LEX_STR) l->match(LEX_STR);
    else l->match(LEX_ID);
    l->match(':');
    CScriptVarSmartLink a = assignment(execute);
    if (execute) {
      contents->addChild(id, a->var);
    }
    // no need to clean here, as it will definitely be used
    if (l->tk != '}') l->match(',');
  }

  l->match('}');
} catch (CScriptException *e) {
  delete contents;
  throw e;
}

Original issue reported on code.google.com by zhoujr.m...@gmail.com on 27 Dec 2011 at 10:14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant