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 9AD3846970E for ; Fri, 20 Dec 2019 15:04:48 +0300 (MSK) Received: by mail-lj1-f194.google.com with SMTP id e28so9753734ljo.9 for ; Fri, 20 Dec 2019 04:04:48 -0800 (PST) Date: Fri, 20 Dec 2019 15:04:46 +0300 From: Konstantin Osipov Message-ID: <20191220120446.GA9637@atlas> References: <20191217125420.20881-1-gorcunov@gmail.com> <20191217125420.20881-3-gorcunov@gmail.com> <20191220081159.GG30445@atlas> <20191220115257.GA10179@uranus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191220115257.GA10179@uranus> 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: Cyrill Gorcunov Cc: tml * 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? -- Konstantin Osipov, Moscow, Russia