osproc: free resources properly for the new poInteractive flag

This commit is contained in:
Araq 2015-09-29 20:00:28 +02:00
commit 27bdf5c45c

View file

@ -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}: