Regla InitFreeDeviceCreateType2 (kmdf)

La regla InitFreeDeviceCreateType2 especifica que un controlador no debe llamar a WdfDeviceCreate después de llamar a WdfDeviceInitFree.

Modelo de controlador: KMDF

Cómo probar

En tiempo de compilación

Ejecute el Comprobador de controladores estáticos y especifique la regla InitFreeDeviceCreateType2 .

Usa los pasos siguientes para ejecutar un análisis de tu código:
  1. Prepara el código (usa declaraciones de tipos de rol).
  2. Ejecuta el comprobador de controlador estático.
  3. Consulta y analiza los resultados.

Para obtener más información, vea Usar comprobador de controladores estáticos para buscar defectos en controladores.

Se aplica a

WdfControlDeviceInitAllocateWdfDeviceCreateWdfDeviceInitFree

Consulte también

InitFreeDeviceCallbackInitFreeDeviceCreatePdoInitFreeDeviceCreateType2InitFreeDeviceCreateType4PdoInitFreeDeviceCallbackPdoInitFreeDeviceCreatePdoInitFreeDeviceCreate PdoInitFreeDeviceCreateType4InitFreeNull