From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15155 invoked by alias); 3 Mar 2009 09:30:13 -0000 Received: (qmail 15141 invoked by uid 22791); 3 Mar 2009 09:30:12 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.184) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Mar 2009 09:30:06 +0000 Received: by ti-out-0910.google.com with SMTP id y8so2955763tia.12 for ; Tue, 03 Mar 2009 01:30:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.110.57.5 with SMTP id f5mr10167810tia.1.1236072602128; Tue, 03 Mar 2009 01:30:02 -0800 (PST) In-Reply-To: References: Date: Tue, 03 Mar 2009 09:30:00 -0000 Message-ID: Subject: Re: All function that call function find_function_in_inferior have memory leak? From: teawater To: gdb ml Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-03/txt/msg00020.txt.bz2 I miss "free_all_values ();" in "execute_command". So sorry to disturb you. Hui On Tue, Mar 3, 2009 at 17:15, teawater wrote: > Hi guys, > > I found that function find_function_in_inferior will alloc a "struct > value *val" and return it. > But I can't find any function call value_free to free it. > > For example: > Function scm_inferior_print: > func = find_function_in_inferior ("gdb_print", &objf); > > Function checkpoint_command: > fork_fn = find_function_in_inferior ("fork", &fork_objf); > > Did I miss something or this is a memory leak? > > Thanks, > Hui >