From 4ca0b5610670e5e71ce78f04f6471a962aa35d69 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Fri, 18 Dec 2020 13:44:40 +0100 Subject: [PATCH] flash: zero initialize --- core/hw/flashrom/flashrom.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/hw/flashrom/flashrom.h b/core/hw/flashrom/flashrom.h index c6e8db239..d79d10ec0 100644 --- a/core/hw/flashrom/flashrom.h +++ b/core/hw/flashrom/flashrom.h @@ -17,9 +17,9 @@ struct MemChip MemChip(u32 size, u32 write_protect_size = 0) { - this->data=new u8[size]; - this->size=size; - this->mask=size-1;//must be power of 2 + this->data = new u8[size](); + this->size = size; + this->mask = size - 1; // must be power of 2 this->write_protect_size = write_protect_size; } virtual ~MemChip() { delete[] data; }