CID 1251: If the NetStack::Init() fails, return the corresponding error instead
of setting the global net stack to a deleted value. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27479 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2391ca5568
commit
84cd8e6902
@ -88,8 +88,10 @@ NetStack::CreateDefault()
|
|||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
status_t error = netStack->Init();
|
status_t error = netStack->Init();
|
||||||
if (error != B_OK)
|
if (error != B_OK) {
|
||||||
delete netStack;
|
delete netStack;
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
sNetStack = netStack;
|
sNetStack = netStack;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user