No ENV_PRIVATE_DATA alloc here and empty user name if query fails

This commit is contained in:
Jeff Hill
1995-02-17 20:07:06 +00:00
parent 67b4dc7064
commit 6d2eafd2ca

View File

@@ -37,8 +37,6 @@
*/
#include <process.h>
#define ENV_PRIVATE_DATA
#include "iocinf.h"
#ifndef _WINDOWS
@@ -198,8 +196,12 @@ char *localUserName()
int length;
char *pName;
char *pTmp;
char Uname[] = "";
pName = getenv("USERNAME");
if (!pName) {
pName = Uname;
}
length = strlen(pName)+1;
pTmp = malloc(length);