Skip to content

Commit

Permalink
Endpoint allocator should not be forked in DIC.
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb James DeLisle committed Dec 8, 2012
1 parent 34dcc99 commit 5ddc35d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/DefaultInterfaceController.c
Expand Up @@ -376,10 +376,8 @@ static int registerPeer(struct InterfaceController* ifController,
return InterfaceController_registerPeer_OUT_OF_SPACE;
}

struct Allocator* epAllocator =
externalInterface->allocator->child(externalInterface->allocator);

struct Endpoint* ep = epAllocator->calloc(sizeof(struct Endpoint), 1, epAllocator);
struct Allocator* epAllocator = externalInterface->allocator;
struct Endpoint* ep = Allocator_calloc(epAllocator, sizeof(struct Endpoint), 1);
int setIndex = Map_OfEndpointsByKey_put(&ep, &ic->endpointSet);
ep->handle = ic->endpointSet.handles[setIndex];
Identity_set(ep);
Expand Down

0 comments on commit 5ddc35d

Please sign in to comment.