summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-09-29 20:00:28 +0200
committerAraq <rumpf_a@web.de>2015-09-29 20:00:28 +0200
commit27bdf5c45c7850f62ae573fdcd86e8490a2bec15 (patch)
tree6428c87e3c4c6413c55c44a16a7e8200380022cf
parent5f7ad9131f7e02416a6c9aff7a2caf7d6096697b (diff)
downloadNim-27bdf5c45c7850f62ae573fdcd86e8490a2bec15.tar.gz
osproc: free resources properly for the new poInteractive flag
-rw-r--r--lib/pure/osproc.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim
index 454f9eda0..bc73f7119 100644
--- a/lib/pure/osproc.nim
+++ b/lib/pure/osproc.nim
@@ -534,6 +534,7 @@ when defined(Windows) and not defined(useNimRtl):
 
     if e != nil: dealloc(e)
     if success == 0:
+      if poInteractive in result.options: close(result)
       const errInvalidParameter = 87.int
       const errFileNotFound = 2.int
       if lastError.int in {errInvalidParameter, errFileNotFound}: