Missing std::nothrow on new
Forgot to add this when migrating to BOpenHashTable.
This commit is contained in:
@@ -753,13 +753,13 @@ uninit()
|
||||
static status_t
|
||||
init()
|
||||
{
|
||||
sTeamHash = new TeamTable();
|
||||
sTeamHash = new(std::nothrow) TeamTable();
|
||||
if (sTeamHash == NULL || sTeamHash->Init(64) != B_OK)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
status_t status;
|
||||
|
||||
sRulesHash = new RuleTable();
|
||||
sRulesHash = new(std::nothrow) RuleTable();
|
||||
if (sRulesHash == NULL || sRulesHash->Init(64) != B_OK) {
|
||||
delete sTeamHash;
|
||||
return B_NO_MEMORY;
|
||||
|
||||
@@ -944,7 +944,7 @@ arp_init()
|
||||
{
|
||||
mutex_init(&sCacheLock, "arp cache");
|
||||
|
||||
sCache = new AddressCache();
|
||||
sCache = new(std::nothrow) AddressCache();
|
||||
if (sCache == NULL || sCache->Init(64) != B_OK) {
|
||||
mutex_destroy(&sCacheLock);
|
||||
return B_NO_MEMORY;
|
||||
|
||||
@@ -407,7 +407,7 @@ ndp_init()
|
||||
|
||||
mutex_init(&sCacheLock, "ndp cache");
|
||||
|
||||
sCache = new AddressCache();
|
||||
sCache = new(std::nothrow) AddressCache();
|
||||
if (sCache == NULL || sCache->Init(64) != B_OK) {
|
||||
mutex_destroy(&sCacheLock);
|
||||
return B_NO_MEMORY;
|
||||
|
||||
@@ -798,26 +798,26 @@ init_stack()
|
||||
mutex_init(&sChainLock, "net chains");
|
||||
mutex_init(&sInitializeChainLock, "net intialize chains");
|
||||
|
||||
sFamilies = new FamilyTable();
|
||||
sFamilies = new(std::nothrow) FamilyTable();
|
||||
if (sFamilies == NULL || sFamilies->Init(10) != B_OK) {
|
||||
status = B_NO_MEMORY;
|
||||
goto err5;
|
||||
}
|
||||
|
||||
sProtocolChains = new ChainTable();
|
||||
sProtocolChains = new(std::nothrow) ChainTable();
|
||||
if (sProtocolChains == NULL || sProtocolChains->Init(10) != B_OK) {
|
||||
status = B_NO_MEMORY;
|
||||
goto err6;
|
||||
}
|
||||
|
||||
sDatalinkProtocolChains = new ChainTable();
|
||||
sDatalinkProtocolChains = new(std::nothrow) ChainTable();
|
||||
if (sDatalinkProtocolChains == NULL
|
||||
|| sDatalinkProtocolChains->Init(10) != B_OK) {
|
||||
status = B_NO_MEMORY;
|
||||
goto err7;
|
||||
}
|
||||
|
||||
sReceivingProtocolChains = new ChainTable();
|
||||
sReceivingProtocolChains = new(std::nothrow) ChainTable();
|
||||
if (sReceivingProtocolChains == NULL
|
||||
|| sReceivingProtocolChains->Init(10) != B_OK) {
|
||||
status = B_NO_MEMORY;
|
||||
|
||||
@@ -887,7 +887,7 @@ devfs_mount(fs_volume* volume, const char* devfs, uint32 flags,
|
||||
if (fs == NULL) {
|
||||
err = B_NO_MEMORY;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
volume->private_volume = fs;
|
||||
volume->ops = &kVolumeOps;
|
||||
@@ -897,7 +897,7 @@ devfs_mount(fs_volume* volume, const char* devfs, uint32 flags,
|
||||
|
||||
recursive_lock_init(&fs->lock, "devfs lock");
|
||||
|
||||
fs->vnode_hash = new NodeTable();
|
||||
fs->vnode_hash = new(std::nothrow) NodeTable();
|
||||
if (fs->vnode_hash == NULL || fs->vnode_hash->Init(DEVFS_HASH_SIZE) != B_OK) {
|
||||
err = B_NO_MEMORY;
|
||||
goto err2;
|
||||
|
||||
@@ -2553,7 +2553,7 @@ elf_init(kernel_args *args)
|
||||
|
||||
image_init();
|
||||
|
||||
sImagesHash = new ImageHash();
|
||||
sImagesHash = new(std::nothrow) ImageHash();
|
||||
if (sImagesHash == NULL)
|
||||
return B_NO_MEMORY;
|
||||
status_t init = sImagesHash->Init(IMAGE_HASH_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user