Fixed a bug and memory leak in PPPManager.
Added *very* naive semaphore-deletion detection code to ethernet module (fixes crashing bug on unload). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14409 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
26abf74673
commit
a957e4c978
@ -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; }
|
||||
|
@ -93,9 +93,11 @@ PPPManager::~PPPManager()
|
||||
app = fApps.ItemAt(index);
|
||||
if(app) {
|
||||
free(app->interfaceName);
|
||||
delete entry;
|
||||
delete app;
|
||||
}
|
||||
}
|
||||
|
||||
free(fDefaultInterface);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user