[systemd-devel] [PATCH v2 19/26] dhcp: Add timeout and main loop support

Patrik Flykt Patrik.Flykt at linux.intel.com
Wed Nov 27 06:52:35 PST 2013


On Tue, 2013-11-26 at 00:15 +0100, Lennart Poettering wrote:
> On Mon, 25.11.13 09:13, Patrik Flykt (patrik.flykt at linux.intel.com) wrote:
> 
> > -DHCPClient *sd_dhcp_client_new(void)
> > +DHCPClient *sd_dhcp_client_new(sd_event *event)
> >  {
> >          DHCPClient *client;
> >  
> > +        assert_return(event, NULL);
> > +
> >          client = new0(DHCPClient, 1);
> >          if (!client)
> >                  return NULL;
> >  
> > +        client->event = event;
> 
> You should probably take a reference here with sd_event_ref(), and then
> unref it again in your destructor.

Ok.

	Patrik




More information about the systemd-devel mailing list