diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-01-20 20:25:18 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-01-20 20:25:18 +0000 |
commit | 3faa7a29690c67802054f31748f7fb5497a10f59 (patch) | |
tree | 619e650dc81b03aeec45e886e8ed3724ca253533 | |
parent | 2010-01-20 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-3faa7a29690c67802054f31748f7fb5497a10f59.tar.bz2 |
2010-01-20 Joel Sherrill <joel.sherrill@oarcorp.com>
Coverity Id 30
* libmisc/shell/hexdump-parse.c:
-rw-r--r-- | cpukit/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/libmisc/shell/hexdump-parse.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index acdf521fde..0a25c6cccc 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,10 @@ 2010-01-20 Joel Sherrill <joel.sherrill@oarcorp.com> + Coverity Id 30 + * libmisc/shell/hexdump-parse.c: + +2010-01-20 Joel Sherrill <joel.sherrill@oarcorp.com> + Coverity Id 1 * libmisc/shell/fts.c: diff --git a/cpukit/libmisc/shell/hexdump-parse.c b/cpukit/libmisc/shell/hexdump-parse.c index 5020b8a22b..3b153952d2 100644 --- a/cpukit/libmisc/shell/hexdump-parse.c +++ b/cpukit/libmisc/shell/hexdump-parse.c @@ -420,6 +420,10 @@ isint2: switch(fu->bcnt) { for (pr = fu->nextpr; pr; pr = pr->nextpr) fu->bcnt += pr->bcnt; } + if (pr) { + free(pr); + pr = NULL; + } /* * If the format string interprets any data at all, and it's * not the same as the blocksize, and its last format unit @@ -451,8 +455,6 @@ isint2: switch(fu->bcnt) { (void)printf("\n"); } #endif - if (pr) - free(pr); } void |