From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.7 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id BB1D72035F for ; Wed, 31 Aug 2016 08:21:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759526AbcHaIVy (ORCPT ); Wed, 31 Aug 2016 04:21:54 -0400 Received: from mout.gmx.net ([212.227.15.18]:64538 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759522AbcHaIVv (ORCPT ); Wed, 31 Aug 2016 04:21:51 -0400 Received: from virtualbox ([37.24.141.250]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0Me8RK-1bSQMh2BkU-00PsUb; Wed, 31 Aug 2016 10:20:57 +0200 Date: Wed, 31 Aug 2016 10:20:56 +0200 (CEST) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: Junio C Hamano cc: =?UTF-8?Q?Jakub_Nar=C4=99bski?= , git@vger.kernel.org Subject: Re: [PATCH 05/22] sequencer: allow the sequencer to take custody of malloc()ed data In-Reply-To: Message-ID: References: <733a899a-470b-79b3-b059-b38313a7057d@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-698130740-1472631657=:129229" X-Provags-ID: V03:K0:827XkEN9jeE+APLI6XiTCWRWr1/eMFLrtIMMLG3pGaiNc7z43VA l8L+dqM87khcYxxcLXY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ailing-List: git@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-698130740-1472631657=:129229 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Hi Junio, On Tue, 30 Aug 2016, Junio C Hamano wrote: > Jakub Nar=C4=99bski writes: >=20 > > In my personal opinion 'set_me_free_after_use' is not the best name, > > but I unfortunately do not have a better proposal. Maybe 'entrust_ptr'= , > > or 'entrusted_data' / 'entrusted_ptr' / 'entrusted'? >=20 > Is this to accumulate to-be-freed pointers? Yes. > I think we often call a local variable that points at a piece of > memory to be freed "to_free", and that is an appropriate name for > what this function is trying to do. I changed it to that. > It is a bit surprising that the careless memory management in this > codepath leaks only the dumb pieces of memory (as opposed to > pointers to structures like string list that needs _clear() > functions, in which case we cannot get away with list of > to-be-freed). I guess we were somewhat lucky ;-) Yeah, the carelessness is more like a convenience where the config machinery is reused to parse the values. Ciao, Dscho --8323329-698130740-1472631657=:129229--