From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anders Fugmann Subject: Re: libipfwc memory leak? Date: Fri, 27 Sep 2002 22:44:12 +0200 Sender: netfilter-admin@lists.netfilter.org Message-ID: <3D94C31C.4060207@fugmann.dhs.org> References: <20020923173958.631b43b5.wireless@wireless.org.ua> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: "Andriy T.Yanko" Cc: netfilter@lists.netfilter.org Andriy T.Yanko wrote: > Hi people! > > In libipfwc.c function ipfwc_get_chainnames & ipfwc_get_rules use malloc() but not use free(). > It's maybe ok for program ipchains but in my case is not gut. > > How to fix it? You have to free the structures yourself. If the functions themself freed the structures, they would not be able to return anything. This is not an error in libipfwc. Regards Anders Fugmann