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

Unified Diff: cloud_print/virtual_driver/win/port_monitor/port_monitor.cc

Issue 413553002: Fixed MonitorData deletion in Monitor2Shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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: cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
index bfd7bdc1a5d6b7ffd7b4a24539cff9baeec5098d..e8a8574df6c9051bd01ea1805cfd878dbaf5cbed 100644
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
+++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
@@ -515,16 +515,13 @@ BOOL WINAPI Monitor2ClosePort(HANDLE port_handle) {
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
- PortData* port_data = reinterpret_cast<PortData*>(port_handle);
- delete port_data;
+ delete reinterpret_cast<PortData*>(port_handle);
return TRUE;
}
VOID WINAPI Monitor2Shutdown(HANDLE monitor_handle) {
if (monitor_handle != NULL) {
- MonitorData* monitor_data =
- reinterpret_cast<MonitorData*>(monitor_handle);
- delete monitor_handle;
+ delete reinterpret_cast<MonitorData*>(monitor_handle);
}
}
@@ -581,8 +578,7 @@ DWORD WINAPI Monitor2XcvDataPort(HANDLE xcv_handle,
}
BOOL WINAPI Monitor2XcvClosePort(HANDLE handle) {
- XcvUiData* xcv_data = reinterpret_cast<XcvUiData*>(handle);
- delete xcv_data;
+ delete reinterpret_cast<XcvUiData*>(handle);
return TRUE;
}
« 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