david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

I hate NULL pointer dereferences.

This commit is contained in:
Michael Brown 2007-01-11 05:27:02 +00:00
parent 03390f0cd6
commit 037da9d840
1 changed files with 4 additions and 0 deletions

View File

@ -91,6 +91,10 @@ int netdev_tx ( struct net_device *netdev, struct pk_buff *pkb ) {
void netdev_tx_complete ( struct net_device *netdev, struct pk_buff *pkb ) {
DBGC ( netdev, "NETDEV %p transmission %p complete\n", netdev, pkb );
/* Catch data corruption as early as possible */
assert ( pkb->list.next != NULL );
assert ( pkb->list.prev != NULL );
list_del ( &pkb->list );
free_pkb ( pkb );
}