Fixed a bug in the code for clearing the network queues, should reduce crashes even further.
This commit is contained in:
@@ -275,14 +275,15 @@ network_queue_advance(int tx)
|
|||||||
static void
|
static void
|
||||||
network_queue_clear(int tx)
|
network_queue_clear(int tx)
|
||||||
{
|
{
|
||||||
netpkt_t *temp = first_pkt[tx];
|
netpkt_t *temp = first_pkt[tx], *temp2;
|
||||||
|
|
||||||
if (temp == NULL)
|
if (temp == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
temp2 = temp->next;
|
||||||
free(temp);
|
free(temp);
|
||||||
temp = temp->next;
|
temp = temp2;
|
||||||
} while (temp != NULL);
|
} while (temp != NULL);
|
||||||
|
|
||||||
first_pkt[tx] = last_pkt[tx] = NULL;
|
first_pkt[tx] = last_pkt[tx] = NULL;
|
||||||
|
Reference in New Issue
Block a user