diff --git a/src/add-ons/kernel/network/interfaces/ethernet/ethernet.c b/src/add-ons/kernel/network/interfaces/ethernet/ethernet.c index 049d46a31f..21a55ace80 100644 --- a/src/add-ons/kernel/network/interfaces/ethernet/ethernet.c +++ b/src/add-ons/kernel/network/interfaces/ethernet/ethernet.c @@ -377,10 +377,13 @@ int32 ether_input(void *data) struct mbuf *m; struct ether_header *eth; int len; + status_t error = B_OK; while (1) { len = sizeof(struct ether_header); - acquire_sem_etc(etherq->pop, 1, B_CAN_INTERRUPT, 0); + error = acquire_sem_etc(etherq->pop, 1, B_CAN_INTERRUPT, 0); + if(error != B_NO_ERROR) + return error; IFQ_DEQUEUE(etherq, m); if (!m) continue; @@ -428,7 +431,7 @@ int32 ether_input(void *data) } } - return 0; + return error; } #define senderr(e) { error = (e); goto bad; } diff --git a/src/add-ons/kernel/network/interfaces/ppp/PPPManager.cpp b/src/add-ons/kernel/network/interfaces/ppp/PPPManager.cpp index 0e09335d63..c321012102 100644 --- a/src/add-ons/kernel/network/interfaces/ppp/PPPManager.cpp +++ b/src/add-ons/kernel/network/interfaces/ppp/PPPManager.cpp @@ -93,9 +93,11 @@ PPPManager::~PPPManager() app = fApps.ItemAt(index); if(app) { free(app->interfaceName); - delete entry; + delete app; } } + + free(fDefaultInterface); }