summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-11-06 16:41:44 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2007-11-06 16:41:44 -0800
commit95887fd39f57ce0e81169140605c81e70a1a4734 (patch)
treebb970925df7ae4d2c4f81591f5e57c06f9d65bd2 /src
parent6482033bfb5b515f6fd6e05b65439231e374a5cb (diff)
downloadvyatta-cfg-95887fd39f57ce0e81169140605c81e70a1a4734.tar.gz
vyatta-cfg-95887fd39f57ce0e81169140605c81e70a1a4734.zip
fix for bug 2273: cli parser was overwriting "type help" with "node help".
Diffstat (limited to 'src')
-rw-r--r--src/cli_new.c3
-rw-r--r--src/cli_parse.y2
-rw-r--r--src/cli_val.h1
3 files changed, 5 insertions, 1 deletions
diff --git a/src/cli_new.c b/src/cli_new.c
index c0fb845..630bf9f 100644
--- a/src/cli_new.c
+++ b/src/cli_new.c
@@ -1340,6 +1340,9 @@ void free_def(vtw_def *defp)
free_node_tree(defp->actions[act].vtw_list_head);
if (defp->def_type_help)
my_free(defp->def_type_help);
+ if (defp->def_node_help) {
+ my_free(defp->def_node_help);
+ }
if (defp->def_default)
my_free(defp->def_default);
}
diff --git a/src/cli_parse.y b/src/cli_parse.y
index f0e43a8..372f3a9 100644
--- a/src/cli_parse.y
+++ b/src/cli_parse.y
@@ -103,7 +103,7 @@ cause: help_cause
;
help_cause: HELP STRING
- { parse_defp->def_type_help = $2; /* no semantics for now */
+ { parse_defp->def_node_help = $2; /* no semantics for now */
}
default_cause: DEFAULT VALUE
diff --git a/src/cli_val.h b/src/cli_val.h
index e147d4c..fec8054 100644
--- a/src/cli_val.h
+++ b/src/cli_val.h
@@ -99,6 +99,7 @@ typedef enum {
typedef struct {
vtw_type_e def_type;
char *def_type_help;
+ char *def_node_help;
char *def_default;
boolean tag;
boolean multi;