Kinsey Moore started a new discussion on rtemslwip/greth/greth_netif.c: https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/merge_requests/40#note_152381 > + if ( !rxch->rx_pbuf_ref ) { > + greth_debug_printf( > + "[ERR] greth_init_buffer_descriptors: Failed to allocate memory " > + "for RX pbuf references\n" > + ); > + goto free_rx_pbuf; > + } > + > + txch->desc_array = (struct greth_bd *) > + aligned_alloc( bd_table_size, bd_table_size ); > + if ( !txch->desc_array ) { > + greth_debug_printf( > + "[ERR] greth_init_buffer_descriptors: Failed to allocate memory " > + "for TX descriptors\n" > + ); > + goto free_tx_desc; We should avoid gotos. This can instead free known allocations or it can initialize to NULL and pass all things that might need to be freed to a helper function that checks for and frees anything that as allocated. -- View it on GitLab: https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/merge_requests/40#note_152381 You're receiving this email because of your account on gitlab.rtems.org.
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
