mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
env_nand: fix env memory release
This fixes a bug that tmp environment memory not being released. Signed-off-by: Derek Ou <dou@siconix.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
This commit is contained in:
parent
9d8811c5bd
commit
5a9427dc9b
1 changed files with 4 additions and 2 deletions
|
@ -304,9 +304,11 @@ void env_relocate_spec (void)
|
|||
crc1_ok = (crc32(0, tmp_env1->data, ENV_SIZE) == tmp_env1->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();
|
||||
else if(crc1_ok && !crc2_ok)
|
||||
} else if(crc1_ok && !crc2_ok)
|
||||
gd->env_valid = 1;
|
||||
else if(!crc1_ok && crc2_ok)
|
||||
gd->env_valid = 2;
|
||||
|
|
Loading…
Reference in a new issue