Commit a59ae05b by Ian Elliott Committed by Commit Bot

Fix compilation error and memory leak

Bug: angleproject:2794 Change-Id: Iaedf83aabef6813c023b97387b35510165cb831c Reviewed-on: https://chromium-review.googlesource.com/1220370 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: 's avatarIan Elliott <ianelliott@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 2da04538
...@@ -902,22 +902,24 @@ ANGLE_EXPORT bool ANGLEUseForApplication(const char *appName, ...@@ -902,22 +902,24 @@ ANGLE_EXPORT bool ANGLEUseForApplication(const char *appName,
{ {
Scenario scenario(appName, deviceMfr, deviceModel); Scenario scenario(appName, deviceMfr, deviceModel);
RuleList *rules = RuleList::ReadRulesFromJsonFile(); RuleList *rules = RuleList::ReadRulesFromJsonFile();
bool rtn = false;
scenario.logScenario(); scenario.logScenario();
rules->logRules(); rules->logRules();
if (developerOption != ANGLE_NO_PREFERENCE) if (developerOption != ANGLE_NO_PREFERENCE)
{ {
return (developerOption == ANGLE_PREFER_ANGLE); rtn = (developerOption == ANGLE_PREFER_ANGLE);
} }
else if ((appPreference != ANGLE_NO_PREFERENCE) && rules->getAppChoice(scenario)) else if ((appPreference != ANGLE_NO_PREFERENCE) && rules->getAppChoice(scenario))
{ {
return (appPreference == ANGLE_PREFER_ANGLE); rtn = (appPreference == ANGLE_PREFER_ANGLE);
} }
else else
{ {
return rules->getAnswer(scenario); rtn = rules->getAnswer(scenario);
} }
delete rules; delete rules;
return rtn;
} }
} // extern "C" } // extern "C"
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