diff options
author | cheatfate <ka@hardcore.kiev.ua> | 2016-06-14 22:33:15 +0300 |
---|---|---|
committer | cheatfate <ka@hardcore.kiev.ua> | 2016-06-14 22:33:15 +0300 |
commit | 974dcc87666a42ee6a4fea197df65956398d7ae1 (patch) | |
tree | 2fab2640d6a22024dd35277306e338fc4ac98881 | |
parent | 11d9b15fc49bc229ee2881f48c52bb7b75d0ee96 (diff) | |
download | Nim-974dcc87666a42ee6a4fea197df65956398d7ae1.tar.gz |
One more place to release callback environment protection
-rw-r--r-- | lib/pure/asyncdispatch.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim index 1e6db2a33..8ba4b5cca 100644 --- a/lib/pure/asyncdispatch.nim +++ b/lib/pure/asyncdispatch.nim @@ -534,6 +534,8 @@ when defined(windows) or defined(nimdoc): assert customOverlapped.data.fd == lpCompletionKey.AsyncFD customOverlapped.data.cb(customOverlapped.data.fd, lpNumberOfBytesTransferred, errCode) + if customOverlapped.data.cell.data != nil: + system.dispose(customOverlapped.data.cell) GC_unref(customOverlapped) else: if errCode.int32 == WAIT_TIMEOUT: |