From cb03b8fa9af8addb1909e151b947c22acd5ba030 Mon Sep 17 00:00:00 2001 From: mtbishop Date: Mon, 8 Dec 2008 13:01:23 +0000 Subject: [PATCH] rfe2405993 - mem leak in cfg_file.y --- ChangeLog | 1 + Credits | 3 +++ cfg_file.y | 8 +++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 51c10af..52a0f99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 3.0.3: rfe2149137 - makefile ignores LDFLAGS (sbk) + rfe2405993 - mem leak in config parser (frY) 3.0.2: ref1685781 - vtun3 client should parse vtun2 server encr directives (hch) diff --git a/Credits b/Credits index 5638a0d..bc77436 100644 --- a/Credits +++ b/Credits @@ -143,3 +143,6 @@ Hans Carlos Hoffman Serge B. Khvatov Makefile fix for LDFLAGS (rfe2149137) + +Yasuyuki + Mem leak in cfg_file.y (rfe2405993) diff --git a/cfg_file.y b/cfg_file.y index 72da402..4fef08a 100644 --- a/cfg_file.y +++ b/cfg_file.y @@ -18,7 +18,7 @@ */ /* - * $Id: cfg_file.y,v 1.8.2.2 2008/01/07 22:35:22 mtbishop Exp $ + * $Id: cfg_file.y,v 1.8.2.3 2008/12/08 13:01:23 mtbishop Exp $ */ #include "config.h" @@ -569,6 +569,12 @@ int free_host(void *d, void *u) llist_free(&h->down, free_cmd, NULL); free_addr(h); + + /* releases only host struct instances which were + * allocated in the case of K_HOST except default_host */ + if( h->passwd ) + free(h); + return 0; }