OSDN Git Service

* cygheap.cc (cygheap_user::set_name): Remove setting homedrive and
authorcorinna <corinna>
Thu, 13 Jun 2002 11:35:10 +0000 (11:35 +0000)
committercorinna <corinna>
Thu, 13 Jun 2002 11:35:10 +0000 (11:35 +0000)
homepath to NULL.
(cygheap_user::set_logsrv):  Fix free'ing of plogsrv.
* cygheap.h (cygheap_user::cygheap_user): Initialize homedrive and
homepath to NULL.

winsup/cygwin/ChangeLog
winsup/cygwin/cygheap.cc
winsup/cygwin/cygheap.h

index 9fdd60b..a395e9a 100644 (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
index bd6ae3c..3fd2aac 100644 (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
index e4fbe5f..71c00ac 100644 (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 ();