-/* $Id: dllmain.c,v 1.17 2002/11/24 18:42:23 robd Exp $
+/* $Id: dllmain.c,v 1.18 2003/04/24 16:34:26 hbirr Exp $
*
* dllmain.c
*
* DISCLAMED. This includes but is not limited to warrenties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Revision: 1.17 $
- * $Author: robd $
- * $Date: 2002/11/24 18:42:23 $
+ * $Revision: 1.18 $
+ * $Author: hbirr $
+ * $Date: 2003/04/24 16:34:26 $
*
*/
extern char* _acmdln; /* pointer to ascii command line */
#undef _environ
extern char** _environ; /* pointer to environment block */
+extern char** __initenv; /* pointer to initial environment block */
/* LIBRARY GLOBAL VARIABLES ***************************************************/
/* destroy heap */
if (nAttachCount == 0)
{
-
+ if (__initenv && __initenv != _environ)
+ {
+ free(__initenv);
+ __initenv = NULL;
+ }
if (_environ)
{
FreeEnvironmentStringsA(_environ[0]);