From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31867 invoked by alias); 10 Aug 2007 23:01:58 -0000 Received: (qmail 31844 invoked by uid 22791); 10 Aug 2007 23:01:58 -0000 X-Spam-Check-By: sourceware.org Received: from b.mail.sonic.net (HELO b.mail.sonic.net) (64.142.19.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 10 Aug 2007 23:01:52 +0000 Received: from webmail.sonic.net (b.webmail.sonic.net [64.142.100.148]) by b.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id l7AN1oSu030205 for ; Fri, 10 Aug 2007 16:01:50 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Fri, 10 Aug 2007 16:01:50 -0700 (PDT) Message-ID: <16480.12.7.175.2.1186786910.squirrel@webmail.sonic.net> Date: Fri, 10 Aug 2007 23:01:00 -0000 Subject: [PATCH] varobj.c, value_of_root, (another) memory leak From: msnyder@sonic.net To: gdb-patches@sourceware.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20070810160150_87089" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00230.txt.bz2 ------=_20070810160150_87089 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-length: 164 I'm not totally sure about this -- does the return value of var_get_type need to be freed? If so, there are some other places in mi-cmd-var where it isn't being. ------=_20070810160150_87089 Content-Type: text/plain; name="147.txt" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="147.txt" Content-length: 580 2007-08-10 Michael Snyder * varobj.c (value_of_root): Memory leak. Index: varobj.c =================================================================== RCS file: /cvs/src/src/gdb/varobj.c,v retrieving revision 1.90 diff -p -r1.90 varobj.c *** varobj.c 8 Aug 2007 21:46:37 -0000 1.90 --- varobj.c 10 Aug 2007 22:58:51 -0000 *************** value_of_root (struct varobj **var_handl *** 1741,1746 **** --- 1741,1748 ---- var = *var_handle; *type_changed = 1; } + xfree (old_type); + xfree (new_type); } else { ------=_20070810160150_87089--