summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-01-20 15:19:19 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-01-20 15:19:19 +0000
commitefb68e8bf80b73ff4df6b281c61ce8f4ea28e1ff (patch)
tree89846af5dbe26e5a8c30507969b4ddf2d3e8def7 /cpukit/libmisc
parent2010-01-20 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-efb68e8bf80b73ff4df6b281c61ce8f4ea28e1ff.tar.bz2
2010-01-20 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/shell/hexdump-parse.c: Fix uninitialized warning.
Diffstat (limited to 'cpukit/libmisc')
-rw-r--r--cpukit/libmisc/shell/hexdump-parse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpukit/libmisc/shell/hexdump-parse.c b/cpukit/libmisc/shell/hexdump-parse.c
index a39c9f5787..5020b8a22b 100644
--- a/cpukit/libmisc/shell/hexdump-parse.c
+++ b/cpukit/libmisc/shell/hexdump-parse.c
@@ -217,6 +217,7 @@ rewrite(rtems_shell_hexdump_globals* globals, FS *fs)
int nconv, prec;
size_t len;
+ pr = NULL;
nextpr = NULL;
prec = 0;
@@ -450,7 +451,8 @@ isint2: switch(fu->bcnt) {
(void)printf("\n");
}
#endif
- free(pr);
+ if (pr)
+ free(pr);
}
void