Permalink
Browse files

Fix file descriptor leak when starting processes with open-process an…

…d related procedures
  • Loading branch information...
1 parent 29b53bf commit ec92f752f7c05c4d1247bb15acdb47eaaec82791 @feeley feeley committed Sep 14, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/os_io.c
View
@@ -7045,6 +7045,9 @@ int options;)
direction);
*dev = ___CAST(___device_stream*,d);
+
+ if (e == ___FIX(___NO_ERR))
+ device_transfer_close_responsibility (___CAST(___device*,d));
}
if (e != ___FIX(___NO_ERR))
@@ -7186,6 +7189,9 @@ int options;)
direction);
*dev = ___CAST(___device_stream*,d);
+
+ if (e == ___FIX(___NO_ERR))
+ device_transfer_close_responsibility (___CAST(___device*,d));
}
}

0 comments on commit ec92f75

Please sign in to comment.