Rémi Bernon (@rbernon) commented about dlls/cfgmgr32/main.c:
{ LeaveCriticalSection( &ctx->cs ); break;}switch (ctx->type){case DevObjectTypeDeviceInterface:case DevObjectTypeDeviceInterfaceDisplay:{CM_NOTIFY_FILTER filter = { 0 };CONFIGRET ret;filter.cbSize = sizeof( filter );filter.Flags = CM_NOTIFY_FILTER_FLAG_ALL_INTERFACE_CLASSES;filter.FilterType = CM_NOTIFY_FILTER_TYPE_DEVICEINTERFACE;ret = CM_Register_Notification( &filter, ctx, device_query_context_cm_notify_callback, &ctx->notify );
Don't you need to increase ctx reference count while it is registered as a parameter of `CM_Register_Notification`?