summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-01-20 20:25:18 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-01-20 20:25:18 +0000
commit3faa7a29690c67802054f31748f7fb5497a10f59 (patch)
tree619e650dc81b03aeec45e886e8ed3724ca253533 /cpukit/libmisc
parent2010-01-20 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-3faa7a29690c67802054f31748f7fb5497a10f59.tar.bz2
2010-01-20 Joel Sherrill <joel.sherrill@oarcorp.com>
Coverity Id 30 * libmisc/shell/hexdump-parse.c:
Diffstat (limited to 'cpukit/libmisc')
-rw-r--r--cpukit/libmisc/shell/hexdump-parse.c6
1 files changed, 4 insertions, 2 deletions
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