Kinsey Moore started a new discussion on rtemslwip/greth/greth_netif.c: https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/merge_requests/40#note_152379 > + * @param netif Pointer to the lwIP network interface structure associated > with > + * this GRETH device. > + * > + * @retval ERR_OK Initialization completed successfully. > + * @retval ERR_IF Driver attach failed, @ref greth_netif_state allocation > + * failed, or GRETH device already initialized. > + * @retval other Error code returned by low-level GRETH initialization > + * functions (e.g., @ref greth_init_hw(), > + * @ref greth_init_control_structures(), > + * @ref greth_install_interrupt_handlers()). > + */ > +err_t greth_init_dev_and_lwip_netif( struct netif *netif ) > +{ > + err_t ret; > + struct greth_netif_state *nf_state; > + struct lwip_greth_hw_cfg *hw_cfg = netif->state; A `struct greth_netif_state` is passed to netif_add, but this casts it to a `struct lwip_greth_hw_cfg` and later in this function the state parameter is overwritten with a pointer to `struct greth_netif_state` and the original is never freed (and there's no guarantee that it *can* be freed). -- View it on GitLab: https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/merge_requests/40#note_152379 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
