diff options
author | Wolfgang Denk <wd@denx.de> | 2009-02-07 23:37:10 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-02-07 23:37:10 +0100 |
commit | 64ace0d1e5302ada84edb2ea473e5b89198c3353 (patch) | |
tree | df8198b01cded33ff53d8ffcf457e56f7853a891 /common | |
parent | 0cfa6a9de618e9492069172635697c9ceb023642 (diff) | |
parent | 8da601280a8acbc3385784780ed35130e53812f1 (diff) | |
download | u-boot-64ace0d1e5302ada84edb2ea473e5b89198c3353.tar.gz u-boot-64ace0d1e5302ada84edb2ea473e5b89198c3353.tar.bz2 u-boot-64ace0d1e5302ada84edb2ea473e5b89198c3353.zip |
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash
Diffstat (limited to 'common')
-rw-r--r-- | common/env_nand.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/env_nand.c b/common/env_nand.c index 8af9e74aac..e490775ecf 100644 --- a/common/env_nand.c +++ b/common/env_nand.c @@ -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; |