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:
Corentin Wallez 2018-11-20 09:14:40 +00:00 committed by Commit Bot service account
parent fbeca676d4
commit c1bb72c5d2
1 changed files with 1 additions and 1 deletions

View File

@ -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(