Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1496)

Unified Diff: chrome/install_static/install_util.cc

Issue 2727593003: Fix incorrect use of unique_ptr found by PVS-Studio (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/install_static/install_util.cc
diff --git a/chrome/install_static/install_util.cc b/chrome/install_static/install_util.cc
index 6101f59ecf4cb2bdf02e49104cd5419d34b6f1c9..264513ae6b97ab222a1d1b344e21b374866d294b 100644
--- a/chrome/install_static/install_util.cc
+++ b/chrome/install_static/install_util.cc
@@ -497,7 +497,7 @@ void GetExecutableVersionDetails(const std::wstring& exe_path,
DWORD dummy = 0;
DWORD length = ::GetFileVersionInfoSize(exe_path.c_str(), &dummy);
if (length) {
- std::unique_ptr<char> data(new char[length]);
+ std::unique_ptr<char[]> data(new char[length]);
if (::GetFileVersionInfo(exe_path.c_str(), dummy, length, data.get())) {
GetValueFromVersionResource(data.get(), L"ProductVersion", version);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698