--- a/sys/netgraph/ng_device.c +++ b/sys/netgraph/ng_device.c @@ -287,7 +287,6 @@ new_connection->unit, 0, 0, 0600, "ngd%d", new_connection->unit); if(new_connection->ngddev == NULL) { kprintf("%s(): make_dev failed\n", __func__); - SLIST_REMOVE(&sc->head, new_connection, ngd_connection, links); kfree(new_connection, M_DEVBUF); return(-1); } @@ -297,7 +296,6 @@ if(new_connection->readq == NULL) { kprintf("%s(): readq malloc failed\n", __func__); destroy_dev(new_connection->ngddev); - SLIST_REMOVE(&sc->head, new_connection, ngd_connection, links); kfree(new_connection, M_DEVBUF); return(-1); }