• Kyle Evans's avatar
    iflib: allow clone detach if not yet init · 0dd691b4
    Kyle Evans authored
    If we hit an error during init, then we'll unwind our state and attempt
    to detach the device -- don't block it.
    
    This was discovered by creating a wg0 with missing parameters; said
    failure ended up leaving this orphaned device in place and ended up
    panicking the system upon enumeration of the dev.* sysctl space.
    
    Reviewed by:	gallatin, markj
    MFC after:	3 days
    Differential Revision:	https://reviews.freebsd.org/D29145
    0dd691b4