[haiku-commits] Re: r38054 - haiku/trunk/src/add-ons/kernel/network/stack

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 12 Aug 2010 23:18:26 +0200

Stephan Assmus <superstippi@xxxxxx> wrote:
> > +                if (address == NULL) {
> > +                    // Create new on the fly
> > +                    address = new(std::nothrow) 
> > InterfaceAddress(this, 
> > domain);
> > +                    if (address == NULL)
> > +                        return B_NO_MEMORY;
> > +
> > +                    status_t status = AddAddress(address);
> > +                    if (status != B_OK)
> > +                        return status;
> Haven't looked what AddAddress() does, but it looks like a leak in 
> the error 
> case?

Good that I gave you two opportunities to catch it -- this is a direct 
copy and paste from code I broke before :-)
Thanks for proof-reading!

Bye,
   Axel.


Other related posts: