* grub-core/net/ip.c (reassemble): Make asm_buffer into asm_netbuff.
All users updated. (free_rsm): Free header as well. (free_old_fragments): Fix memory leak. * grub-core/net/netbuff.c (grub_netbuff_free): Make return void. * grub-core/net/tftp.c (tftp_receive): Fix memory leak. (destroy_pq): Likewise. * include/grub/net/netbuff.h (grub_netbuff_free): Make return void.
This commit is contained in:
parent
668ea6d26d
commit
5efb817d64
5 changed files with 51 additions and 26 deletions
|
@ -214,6 +214,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
|
|||
tftph = (struct tftphdr *) nb_top->data;
|
||||
if (grub_be_to_cpu16 (tftph->u.data.block) >= data->block + 1)
|
||||
break;
|
||||
grub_netbuff_free (nb_top);
|
||||
grub_priority_queue_pop (data->pq);
|
||||
}
|
||||
if (grub_be_to_cpu16 (tftph->u.data.block) == data->block + 1)
|
||||
|
@ -248,7 +249,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
|
|||
if ((nb_top->tail - nb_top->data) > 0)
|
||||
grub_net_put_packet (&file->device->net->packs, nb_top);
|
||||
else
|
||||
grub_netbuff_free (nb);
|
||||
grub_netbuff_free (nb_top);
|
||||
}
|
||||
}
|
||||
return GRUB_ERR_NONE;
|
||||
|
@ -269,7 +270,10 @@ destroy_pq (tftp_data_t data)
|
|||
{
|
||||
struct grub_net_buff **nb_p;
|
||||
while ((nb_p = grub_priority_queue_top (data->pq)))
|
||||
grub_netbuff_free (*nb_p);
|
||||
{
|
||||
grub_netbuff_free (*nb_p);
|
||||
grub_priority_queue_pop (data->pq);
|
||||
}
|
||||
|
||||
grub_priority_queue_destroy (data->pq);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue