* cygheap.cc (cygheap_user::set_name): Remove setting homedrive and

homepath to NULL.
	(cygheap_user::set_logsrv):  Fix free'ing of plogsrv.
	* cygheap.h (cygheap_user::cygheap_user): Initialize homedrive and
	homepath to NULL.
This commit is contained in:
Corinna Vinschen 2002-06-13 11:35:11 +00:00
parent dc8971488e
commit 5682a6dd3d
3 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2002-06-13 Corinna Vinschen <corinna@vinschen.de>
* cygheap.cc (cygheap_user::set_name): Remove setting homedrive and
homepath to NULL.
(cygheap_user::set_logsrv): Fix free'ing of plogsrv.
* cygheap.h (cygheap_user::cygheap_user): Initialize homedrive and
homepath to NULL.
2002-06-13 Christopher Faylor <cgf@redhat.com>
* security.cc (get_logon_server): Use strcasematch rather than

View File

@ -429,7 +429,7 @@ cygheap_user::~cygheap_user ()
if (pname)
cfree (pname);
if (plogsrv)
cfree (plogsrv);
cfree (plogsrv - 2);
if (pdomain)
cfree (pdomain);
if (psid)
@ -443,15 +443,13 @@ cygheap_user::set_name (const char *new_name)
if (pname)
cfree (pname);
pname = cstrdup (new_name ? new_name : "");
homedrive = NULL;
homepath = NULL;
}
void
cygheap_user::set_logsrv (const char *new_logsrv)
{
if (plogsrv)
cfree (plogsrv);
cfree (plogsrv - 2);
if (!new_logsrv || !*new_logsrv)
plogsrv = NULL;
else

View File

@ -117,6 +117,7 @@ public:
BOOL impersonated;
cygheap_user () : pname (NULL), plogsrv (NULL), pdomain (NULL),
homedrive (NULL), homepath (NULL),
psid (NULL), token (INVALID_HANDLE_VALUE) {}
~cygheap_user ();