summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2012-06-05 11:42:06 -0700
committerJohn Southworth <john.southworth@vyatta.com>2012-06-05 11:42:06 -0700
commitc2c8da176ecb5c64c440af6ee9dc49176f611473 (patch)
treebc0d8a288a8ec6a92235c930ad7c4e801fd60821
parentcdac8c2a896f93548b3edecc8804865d28d2cb63 (diff)
downloadvyatta-cfg-c2c8da176ecb5c64c440af6ee9dc49176f611473.tar.gz
vyatta-cfg-c2c8da176ecb5c64c440af6ee9dc49176f611473.zip
Fix memory problem on bad config file
-rw-r--r--src/cparse/cparse.ypp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cparse/cparse.ypp b/src/cparse/cparse.ypp
index d8d8adc..90a7a57 100644
--- a/src/cparse/cparse.ypp
+++ b/src/cparse/cparse.ypp
@@ -67,8 +67,10 @@ cparse_init()
static void
cparse_cleanup()
{
- delete cur_parent;
delete cur_node;
+ free(nval);
+ free(nname);
+ free(ncomment);
cparse_init();
}