DawnWireAndFrontendFuzzer: don't leak the device.
The dawn::Device(dawnDevice) constructor was adding a reference which caused the device to leak. Fix this by using dawn::Device::Acquire instead. BUG=chromium:904734 Change-Id: Id641459f9285c9da51a0d2a1f88126197bfd79a5 Reviewed-on: https://dawn-review.googlesource.com/c/2561 Reviewed-by: Dan Sinclair <dsinclair@google.com> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
fbeca676d4
commit
c1bb72c5d2
|
@ -39,7 +39,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||||
dawnProcTable procs = dawn_native::GetProcs();
|
dawnProcTable procs = dawn_native::GetProcs();
|
||||||
dawnSetProcs(&procs);
|
dawnSetProcs(&procs);
|
||||||
|
|
||||||
dawn::Device nullDevice = dawn_native::null::CreateDevice();
|
dawn::Device nullDevice = dawn::Device::Acquire(dawn_native::null::CreateDevice());
|
||||||
|
|
||||||
DevNull devNull;
|
DevNull devNull;
|
||||||
std::unique_ptr<dawn_wire::CommandHandler> wireServer(
|
std::unique_ptr<dawn_wire::CommandHandler> wireServer(
|
||||||
|
|
Loading…
Reference in New Issue