From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1420346970E for ; Fri, 20 Dec 2019 15:10:26 +0300 (MSK) Received: by mail-lj1-f194.google.com with SMTP id j1so2412326lja.2 for ; Fri, 20 Dec 2019 04:10:25 -0800 (PST) Date: Fri, 20 Dec 2019 15:10:23 +0300 From: Cyrill Gorcunov Message-ID: <20191220121023.GB10179@uranus> References: <20191217125420.20881-1-gorcunov@gmail.com> <20191217125420.20881-3-gorcunov@gmail.com> <20191220081159.GG30445@atlas> <20191220115257.GA10179@uranus> <20191220120446.GA9637@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191220120446.GA9637@atlas> Subject: Re: [Tarantool-patches] [PATCH v6 2/4] popen: Introduce a backend engine List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Konstantin Osipov Cc: tml On Fri, Dec 20, 2019 at 03:04:46PM +0300, Konstantin Osipov wrote: > * Cyrill Gorcunov [19/12/20 14:56]: > > > > +static void > > > > +handle_free(struct popen_handle *handle) > > > > +{ > > > > + say_debug("popen: handle %p free %p", handle); > > > > + free(handle); > > > > +} > > > > > > I don't understand who owns char *command and why > > > it's not freed here. Could you please clarify? > > > > Look, the command is compiled from argv array into > > a single string dynamically allocated. The handle > > just carries a reference to it. If you think it will > > be more suitable to allocate command together with > > handle itself in one place then sure I'll update. > > Where is it freed? popen_delete -> command_free