Piotr Caban (@piotr) commented about dlls/msvcrt/data.c:
}
*ptr_blk = '\0';
blk[i] = NULL;
- }
- FreeEnvironmentStringsA( environ_strings );
- return blk;
+}
- if (blk)
+static char **env_cloneA( char** env ) +{
- int i;
- char **blk;
- for (i = 0; env[i]; i++) {}
- if ((blk = HeapAlloc( GetProcessHeap(), 0, (i + 1) * sizeof(char *) )))
It can be changed later but since you're rewriting all the functions why not change it to use the malloc/free as native does?