Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2002-06-13 15:35:11 +0400
committerCorinna Vinschen <corinna@vinschen.de>2002-06-13 15:35:11 +0400
commit5682a6dd3d5a5a213a860f66738f4fdd99f5c47e (patch)
treef68c9f5c6943facc5a46d6316fee767088d6dbba /winsup/cygwin
parentdc8971488e7c174ab4084cbdb0a8f12c39b738d7 (diff)
* 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.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/cygheap.cc6
-rw-r--r--winsup/cygwin/cygheap.h1
3 files changed, 11 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 9fdd60bbe..a395e9aa0 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index bd6ae3c65..3fd2aacc9 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -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
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
index e4fbe5fcb..71c00aca8 100644
--- a/winsup/cygwin/cygheap.h
+++ b/winsup/cygwin/cygheap.h
@@ -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 ();