rfe2405993 - mem leak in cfg_file.y

This commit is contained in:
mtbishop 2008-12-08 13:01:23 +00:00
parent 60e41dd4ea
commit cb03b8fa9a
3 changed files with 11 additions and 1 deletions

View File

@ -1,5 +1,6 @@
3.0.3: 3.0.3:
rfe2149137 - makefile ignores LDFLAGS (sbk) rfe2149137 - makefile ignores LDFLAGS (sbk)
rfe2405993 - mem leak in config parser (frY)
3.0.2: 3.0.2:
ref1685781 - vtun3 client should parse vtun2 server encr directives (hch) ref1685781 - vtun3 client should parse vtun2 server encr directives (hch)

View File

@ -143,3 +143,6 @@ Hans Carlos Hoffman <hchs.de>
Serge B. Khvatov <xbatob@users.sf.net> Serge B. Khvatov <xbatob@users.sf.net>
Makefile fix for LDFLAGS (rfe2149137) Makefile fix for LDFLAGS (rfe2149137)
Yasuyuki <fryasu@yahoo.co.jp>
Mem leak in cfg_file.y (rfe2405993)

View File

@ -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" #include "config.h"
@ -569,6 +569,12 @@ int free_host(void *d, void *u)
llist_free(&h->down, free_cmd, NULL); llist_free(&h->down, free_cmd, NULL);
free_addr(h); 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; return 0;
} }