[Tarantool-patches] [PATCH v6 2/4] popen: Introduce a backend engine

Konstantin Osipov kostja.osipov at gmail.com
Fri Dec 20 15:04:46 MSK 2019


* Cyrill Gorcunov <gorcunov at gmail.com> [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


More information about the Tarantool-patches mailing list