diff --git a/sys/compat/ndis/kern_windrv.c b/sys/compat/ndis/kern_windrv.c index 2824bcd5470a..1d4f76c93f5f 100644 --- a/sys/compat/ndis/kern_windrv.c +++ b/sys/compat/ndis/kern_windrv.c @@ -531,7 +531,10 @@ windrv_bus_attach(drv, name) RtlInitAnsiString(&as, name); if (RtlAnsiStringToUnicodeString(&drv->dro_drivername, &as, TRUE)) + { + free(new, M_DEVBUF); return(ENOMEM); + } /* * Set up a fake image pointer to avoid false matches