Skip to content
Snippets Groups Projects
Commit 5a9427dc authored by derek@siconix.com's avatar derek@siconix.com Committed by Scott Wood
Browse files

env_nand: fix env memory release


This fixes a bug that tmp environment memory not being released.

Signed-off-by: default avatarDerek Ou <dou@siconix.com>
Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
parent 9d8811c5
No related branches found
No related tags found
No related merge requests found
...@@ -304,9 +304,11 @@ void env_relocate_spec (void) ...@@ -304,9 +304,11 @@ void env_relocate_spec (void)
crc1_ok = (crc32(0, tmp_env1->data, ENV_SIZE) == tmp_env1->crc); crc1_ok = (crc32(0, tmp_env1->data, ENV_SIZE) == tmp_env1->crc);
crc2_ok = (crc32(0, tmp_env2->data, ENV_SIZE) == tmp_env2->crc); crc2_ok = (crc32(0, tmp_env2->data, ENV_SIZE) == tmp_env2->crc);
if(!crc1_ok && !crc2_ok) if(!crc1_ok && !crc2_ok) {
free(tmp_env1);
free(tmp_env2);
return use_default(); return use_default();
else if(crc1_ok && !crc2_ok) } else if(crc1_ok && !crc2_ok)
gd->env_valid = 1; gd->env_valid = 1;
else if(!crc1_ok && crc2_ok) else if(!crc1_ok && crc2_ok)
gd->env_valid = 2; gd->env_valid = 2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment