Bug fix - release env memory.
PATCH 1/1 Bug fix - release env memory.
This is my first time to create a patch. Not sure if I have done it right.
--- common/env_nand.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
common/env_nand.c +4 -0
@@ -305,7 +305,11 @@ void env_relocate_spec (void) crc2_ok = (crc32 (0 , tmp_env2->data,ENV_SIZE ) == tmp_env2->crc);if (!crc1_ok && !crc2_ok) + { +free (tmp_env1); +free (tmp_env2);return use_default (); + }else if (crc1_ok && !crc2_ok) gd->env_valid =1 ;else if (!crc1_ok && crc2_ok)
Signature · 1 line
1.5.4.3
PATCH 1/1 Bug fix - release env memory.
On Jan 26, 2009, at 11:50 AM, derek at siconix.com wrote:
Looks ok, but
Quoted 2 lines
This is my first time to create a patch. Not sure if I have done it right.
we normally put a description of the fix, issue, etc in this section. (as its the commit message).
Quoted 6 lines
Signed-off-by Derek Ou <[email protected]>---
common/env_nand.c| 4 ++++1 files changed, 4 insertions(+), 0 deletions(-)
- k
PATCH 1/1 Bug fix - release env memory.
In reply to derek at siconix.comDear Derek,
Quoted 1 line · In message <[email protected]> you…
This is my first time to create a patch. Not sure if I have done it right.
Close, but no cigar ;-)
A comment like the line above must go below the "---" line.
Quoted 2 lines
Signed-off-by Derek Ou <[email protected]>---
^^^^^^^^^^^^---- add comments that are not supposed to become art of the commit message only *after* this line.
common/env_nand.c void env_relocate_spec (void) · line 308
Quoted 12 lines
common/env_nand.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)common/env_nand.c +1
-0@@ -305,7 +305,11 @@ void env_relocate_spec (void) crc2_ok = (crc32 (0 , tmp_env2->data,ENV_SIZE ) == tmp_env2->crc);if (!crc1_ok && !crc2_ok) + {
Please put the "{" on the same line with the "if" (see CodingStyle).
common/env_nand.c void env_relocate_spec (void) · line 313
Quoted 5 lines
common/env_nand.c +3
-0+free (tmp_env1); +free (tmp_env2);return use_default (); + }else if (crc1_ok && !crc2_ok)
And the "}" will go on the same line with the "else", too.
common/env_nand.c void env_relocate_spec (void) · line 315
Quoted 2 lines
common/env_nand.c +0
-0gd->env_valid =1 ; else if(!crc1_ok && crc2_ok)
Please fix and resubmit.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Nothing is easier than to denounce the evildoer; nothing is more difficult than to understand him. - Fyodor Dostoevski