diff options
author | Ethan Chen <intervigil@gmail.com> | 2020-04-11 21:52:44 -0700 |
---|---|---|
committer | Ethan Chen <intervigil@gmail.com> | 2020-04-11 21:53:13 -0700 |
commit | 00d66345db7b48cf91a89e83a98630907389aa13 (patch) | |
tree | 12b2ff71cd96388591ebea0c9a46945c371fb53a | |
parent | 588974a3debcd29c08fae450b80477358ba3c234 (diff) | |
download | android_hardware_lineage_livedisplay-00d66345db7b48cf91a89e83a98630907389aa13.tar.gz android_hardware_lineage_livedisplay-00d66345db7b48cf91a89e83a98630907389aa13.tar.bz2 android_hardware_lineage_livedisplay-00d66345db7b48cf91a89e83a98630907389aa13.zip |
livedisplay: sdm: Default initialize objects created with new
* new does not initialize memory.
Change-Id: I20c24002a5972372f78f53b6344a089806d2c047
-rw-r--r-- | sdm/DisplayModes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sdm/DisplayModes.cpp b/sdm/DisplayModes.cpp index 2d334bf..9121f5d 100644 --- a/sdm/DisplayModes.cpp +++ b/sdm/DisplayModes.cpp @@ -106,10 +106,10 @@ std::vector<DisplayMode> DisplayModes::getDisplayModesInternal() { } if (disp_api_get_display_modes != nullptr) { - sdm_disp_mode* tmp = new sdm_disp_mode[count]; + sdm_disp_mode* tmp = new sdm_disp_mode[count](); for (int i = 0; i < count; i++) { tmp[i].id = -1; - tmp[i].name = new char[128]; + tmp[i].name = new char[128](); tmp[i].len = 128; } |