summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/ChangeLog5
-rw-r--r--cpukit/libmisc/shell/hexdump-parse.c6
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