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

Unified Diff: ui/display/util/x11/edid_parser_x11.cc

Issue 989993002: x11: Use scoped_ptr<> for X11 objects where it makes sense. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 9 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
Index: ui/display/util/x11/edid_parser_x11.cc
diff --git a/ui/display/util/x11/edid_parser_x11.cc b/ui/display/util/x11/edid_parser_x11.cc
index 47f8fb68b684dc2c358f706d4746dcce55fe899c..4b07f0a773146ca1bfc277cc7a263cb98178d4d6 100644
--- a/ui/display/util/x11/edid_parser_x11.cc
+++ b/ui/display/util/x11/edid_parser_x11.cc
@@ -39,14 +39,14 @@ bool GetEDIDProperty(XID output, std::vector<uint8_t>* edid) {
bool has_edid_property = false;
int num_properties = 0;
- Atom* properties = XRRListOutputProperties(display, output, &num_properties);
+ gfx::XScopedPtr<Atom[]> properties(
+ XRRListOutputProperties(display, output, &num_properties));
for (int i = 0; i < num_properties; ++i) {
if (properties[i] == edid_property) {
has_edid_property = true;
break;
}
}
- XFree(properties);
if (!has_edid_property)
return false;
« no previous file with comments | « ui/display/chromeos/x11/native_display_delegate_x11.cc ('k') | ui/events/devices/x11/device_data_manager_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698