[PORTCLS] Zero memory in operator new. CORE-16157
authorThomas Faber <thomas.faber@reactos.org>
Fri, 5 Jul 2019 15:26:16 +0000 (17:26 +0200)
committerThomas Faber <thomas.faber@reactos.org>
Fri, 5 Jul 2019 15:31:46 +0000 (17:31 +0200)
commit76e00fab7e959d4b4acd17dababc02f26c2208ef
tree1be606a39f7243298b55ad61772f239d94627f14
parent595ae4c551acbb7859dff58a845f348dfeb69310
[PORTCLS] Zero memory in operator new. CORE-16157

Fixes a regression from 99fa38809fd8ed38d4d59fa1fcf3babb3216b895, which
replaced the kcom.h/stdunk.h versions (which zero memory) with local
implementations (which don't).

Standard C++ does not guarantee that memory is zeroed but several classes
rely on this, in particular for their m_Ref and m_bInitialized members.

Ideally the constructors should be fixed to initialize all required members,
but that task is error-prone so for now we simply restore the previous
behavior.
drivers/wdm/audio/backpln/portcls/dma_slave.cpp
drivers/wdm/audio/backpln/portcls/miniport.cpp
drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp