summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorrobert.bradford <robert.bradford@intel.com>2015-10-30 11:30:20 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-30 18:31:20 +0000
commitf21f21fd88b6a96897c2678177383dfcbdf6f86a (patch)
tree12550359d961a665ae66b5f277fed00ef974a0d2 /ash
parentf7dafa91c1745acecc30c5cede04429163814a77 (diff)
downloadchromium_src-f21f21fd88b6a96897c2678177383dfcbdf6f86a.zip
chromium_src-f21f21fd88b6a96897c2678177383dfcbdf6f86a.tar.gz
chromium_src-f21f21fd88b6a96897c2678177383dfcbdf6f86a.tar.bz2
ash: Fix memory leak in DisplayColorManager on error path
The error path for dealing with missing VCGT data was failing to free the loaded profile. Unfortunately due to https://crbug.com/549239 this error is occuring in the wild. The new unit tests at https://crrev.com/1430633003 cover this particular use case. BUG=None TEST=Inspection of error paths show no more leaks. Review URL: https://codereview.chromium.org/1430573006 Cr-Commit-Position: refs/heads/master@{#357136}
Diffstat (limited to 'ash')
-rw-r--r--ash/display/display_color_manager_chromeos.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/ash/display/display_color_manager_chromeos.cc b/ash/display/display_color_manager_chromeos.cc
index 1ee0a51..1ae844f 100644
--- a/ash/display/display_color_manager_chromeos.cc
+++ b/ash/display/display_color_manager_chromeos.cc
@@ -44,6 +44,7 @@ bool ParseFile(const base::FilePath& path,
qcms_profile_get_vcgt_channel_length(display_profile);
if (!vcgt_channel_length) {
LOG(WARNING) << "No vcgt table in ICC file: " << path.value();
+ qcms_profile_release(display_profile);
return false;
}