osaf/tools/safimm/immcfg/imm_cfg.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
In case of success wordexp returns 0. In error cases accessing wordexp_t
structure is illegal
diff --git a/osaf/tools/safimm/immcfg/imm_cfg.c
b/osaf/tools/safimm/immcfg/imm_cfg.c
--- a/osaf/tools/safimm/immcfg/imm_cfg.c
+++ b/osaf/tools/safimm/immcfg/imm_cfg.c
@@ -1098,7 +1098,8 @@ static int start_cmd() {
}
}
- if(p.we_wordc > 0) {
+
+ if(rc==0 && p.we_wordc > 0) {
if(!strcmp(p.we_wordv[0], "immcfg")) {
optind = 0;
if((rc = imm_operation(p.we_wordc, p.we_wordv))
&& !isCmdLn) {
@@ -1109,10 +1110,9 @@ static int start_cmd() {
alarm(0);
} else
fprintf(stderr, "Not immcfg command\n");
+ wordfree(&p);
}
-
- wordfree(&p);
-
+
done:
if(line) {
free(line);
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel