updater: Remove an unneeded strdup().

StringValue() makes a copy of the arg.

Test: mmma bootable/recovery
Change-Id: I1002994e7496c840aa05c785019bdeca281f467e
This commit is contained in:
Tao Bao 2018-04-24 14:15:14 -07:00
parent fe527cced4
commit 188f3a5bf8

View file

@ -1697,7 +1697,7 @@ static Value* PerformBlockImageUpdate(const char* name, State* state,
for (size_t i = 0; i < cmdcount; ++i) {
if (cmd_map.find(commands[i].name) != cmd_map.end()) {
LOG(ERROR) << "Error: command [" << commands[i].name << "] already exists in the cmd map.";
return StringValue(strdup(""));
return StringValue("");
}
cmd_map[commands[i].name] = &commands[i];
}