X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-CMAE-Analysis: v=2.4 cv=ZIsSJV3b c=1 sm=1 tr=0 ts=5fd3e86e a=+cj0cO56Fp8x7EdhTra87A==:117 a=nmYjz8MGD2AuaRuUEMZf2g==:17 a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=IkcTkHD0fZMA:10 a=zTNgK-yGK50A:10 a=_4g48uZavSRt-0R5rPQA:9 a=QEXdDO2ut3YA:10 X-SECURESERVER-ACCT: glimrick AT epilitimus DOT com Subject: Re: [geda-user] Memory leak patches To: geda-user AT delorie DOT com References: <20201130220505 DOT 0AE4282C54FD AT turkos DOT aspodata DOT se> <7c75ed03-456c-b408-8b50-0448f6b3a04f AT epilitimus DOT com> <1b2c64b3-6a36-c1f3-dd54-bb583c6bea17 AT epilitimus DOT com> <475f980e-fddd-60d1-9a02-a5bc5fb5805b AT epilitimus DOT com> <8706c896-e01a-9e6e-2bab-fe3607064093 AT epilitimus DOT com> From: "Glenn (glimrick AT epilitimus DOT com) [via geda-user AT delorie DOT com]" Message-ID: Date: Fri, 11 Dec 2020 13:45:03 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2plcpnl0121.prod.iad2.secureserver.net X-AntiAbuse: Original Domain - delorie.com X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - epilitimus.com X-Get-Message-Sender-Via: a2plcpnl0121.prod.iad2.secureserver.net: authenticated_id: glimrick AT epilitimus DOT com X-Authenticated-Sender: a2plcpnl0121.prod.iad2.secureserver.net: glimrick AT epilitimus DOT com X-Source: X-Source-Args: X-Source-Dir: X-CMAE-Envelope: MS4xfHo5RzYz2rL+B/XIOqZKyC/BfuxnCmKlVRrWvmyUunJOmdir8THMZDOoXFSngq0qi5yFOVS2lw8Yq6FYNr9W3LMTCnlO8vuwTpfKEm4oG/4oi8Raox7J rMQlwKFdG+eFmzCn3/5gDHDLidGzsKHxrLJS4siIa+wkVfCO8YtlSU9jagkJD63YAv2TpBQd6Thu/wnv8mdpu0lk+HdUECHyoerqtMcpdIRmbBNI/crYemU2 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Roland Lutz wrote: > > A few of the variables you freed were actually still in use, so I had > to change a few things.  In particular, g_object_set_data takes a > generic pointer, so the string mustn't be freed while the object is > still around. In eda_config_get_context_for_file, the path object must > only be freed if it was created in the function or it would result in > a double free; and in restore_current_page, you accidentally freed the > configuration context instead of the retrieved string.  I also moved > the convenience function you introduced to i_basic.c and made it > static (no need to pollute the global namespace with something that is > only used once), removed a comment which made only sense if you knew > the previous version of the code (comments like this go better into > the commit message), simplified the free handling in x_clipboard.c, > and applied gEDA/gaf coding style. > Where can I find your fixes so I can update my mem_leak branch so I don't undo your work? Glenn