* Fixed memory leaks pointed out by Stephan, thanks!
* Automatic whitespace cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38068 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -750,8 +750,10 @@ Interface::Control(net_domain* domain, int32 option, ifreq& request,
|
|||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
status_t status = AddAddress(address);
|
status_t status = AddAddress(address);
|
||||||
if (status != B_OK)
|
if (status != B_OK) {
|
||||||
|
delete address;
|
||||||
return status;
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
// Note, even if setting the address failed, the empty
|
// Note, even if setting the address failed, the empty
|
||||||
// address added here will still be added to the interface.
|
// address added here will still be added to the interface.
|
||||||
@@ -842,8 +844,10 @@ Interface::Control(net_domain* domain, int32 option, ifreq& request,
|
|||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
status_t status = AddAddress(address);
|
status_t status = AddAddress(address);
|
||||||
if (status != B_OK)
|
if (status != B_OK) {
|
||||||
|
delete address;
|
||||||
return status;
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
// Note, even if setting the address failed, the empty
|
// Note, even if setting the address failed, the empty
|
||||||
// address added here will still be added to the interface.
|
// address added here will still be added to the interface.
|
||||||
|
|||||||
Reference in New Issue
Block a user