summaryrefslogtreecommitdiffstats
path: root/cloud_print/virtual_driver/win
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-22 23:46:55 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-22 23:46:55 +0000
commitcf700d74498b952e6f7be7584dacf4f082116481 (patch)
treec30d2f0a00e6f46ea14f6199ffad0d7a65d8fc4e /cloud_print/virtual_driver/win
parent67ca3c6e5e02532613ef7891cee9341f2cd3a296 (diff)
downloadchromium_src-cf700d74498b952e6f7be7584dacf4f082116481.zip
chromium_src-cf700d74498b952e6f7be7584dacf4f082116481.tar.gz
chromium_src-cf700d74498b952e6f7be7584dacf4f082116481.tar.bz2
Fixed MonitorData deletion in Monitor2Shutdown.
Removed temp variables to avoid other confusions. Review URL: https://codereview.chromium.org/413553002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284812 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print/virtual_driver/win')
-rw-r--r--cloud_print/virtual_driver/win/port_monitor/port_monitor.cc10
1 files changed, 3 insertions, 7 deletions
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 bfd7bdc..e8a8574 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;
}