Prevent closing a NULL pinfo handle
Brian Ford
Brian.Ford@flightsafety.com
Thu Aug 17 20:09:00 GMT 2006
I confess to not having a clue what is really going on here, but I'm
seeing the following errors from a CVS build (yes, I know debugging has
been turned on), and it looks like this would be the right thing to do:
CloseHandle(moreinfo->myself_pinfo) 0x0 failed
child_info_spawn::~child_info_spawn():125, Win32 error 6
2006-08-17 Brian Ford <Brian.Ford@FlightSafety.com>
* child_info.h (~child_info_spawn): Prevent closing a NULL handle.
Although, I suspect if the correct thing to do were that simple, it would
already have been noticed and fixed? And yes, I know that functionally
this doesn't make much difference.
--
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...
.
-------------- next part --------------
Index: child_info.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/child_info.h,v
retrieving revision 1.69
diff -u -p -r1.69 child_info.h
--- child_info.h 6 Jul 2006 17:16:36 -0000 1.69
+++ child_info.h 17 Aug 2006 20:01:55 -0000
@@ -122,7 +122,8 @@ public:
cfree (*e);
cfree (moreinfo->envp);
}
- CloseHandle (moreinfo->myself_pinfo);
+ if (moreinfo->myself_pinfo)
+ CloseHandle (moreinfo->myself_pinfo);
cfree (moreinfo);
}
}
More information about the Cygwin-patches
mailing list