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

Unified Diff: runtime/bin/eventhandler_win.cc

Issue 8659032: Fix memory leak in MacOS process handling. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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: runtime/bin/eventhandler_win.cc
diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc
index 61051b193f573f183ae94b8f9a12a5f0d1aff844..043db3c7a1d714128913f883f54ea4780cb17cd2 100644
--- a/runtime/bin/eventhandler_win.cc
+++ b/runtime/bin/eventhandler_win.cc
@@ -483,10 +483,10 @@ int Handle::Write(const void* buffer, int num_bytes) {
if (num_bytes > 4096) num_bytes = 4096;
pending_write_ = IOBuffer::AllocateWriteBuffer(num_bytes);
pending_write_->Write(buffer, num_bytes);
- IssueWrite();
+ if (!IssueWrite()) return -1;
return num_bytes;
} else {
- DWORD bytes_written;
+ DWORD bytes_written = -1;
BOOL ok = WriteFile(handle_,
buffer,
num_bytes,

Powered by Google App Engine
This is Rietveld 408576698