From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7338 invoked by alias); 3 Mar 2009 09:15:22 -0000 Received: (qmail 7315 invoked by uid 22791); 3 Mar 2009 09:15:20 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SARE_SUB_ALL_LEAD,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.187) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Mar 2009 09:15:14 +0000 Received: by ti-out-0910.google.com with SMTP id y8so2951594tia.12 for ; Tue, 03 Mar 2009 01:15:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.110.14.12 with SMTP id 12mr9974324tin.22.1236071710113; Tue, 03 Mar 2009 01:15:10 -0800 (PST) Date: Tue, 03 Mar 2009 09:15:00 -0000 Message-ID: Subject: 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/msg00019.txt.bz2 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