From efb68e8bf80b73ff4df6b281c61ce8f4ea28e1ff Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 20 Jan 2010 15:19:19 +0000 Subject: [PATCH] 2010-01-20 Joel Sherrill * libmisc/shell/hexdump-parse.c: Fix uninitialized warning. --- cpukit/ChangeLog | 4 ++++ cpukit/libmisc/shell/hexdump-parse.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 8121efc261..26dfed8584 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,7 @@ +2010-01-20 Joel Sherrill + + * libmisc/shell/hexdump-parse.c: Fix uninitialized warning. + 2010-01-20 Joel Sherrill Coverity Id 30 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