In normalize_cvsroot, free_port_s is no longer needed (and in fact
creates a call to free() with stack memory..)

"normalizing" also creates a problem with CVSROOTs and CVS/Root and
~/.cvspass files that don't have the port number in them..  It will
never match with the ~/.cvspass password (in get_cvs_password) until it
is checked-out again.  An explicit login with the _full_ repository name
(including port) does seem to fix the problem..

Fix is below:

Index: root.c
===================================================================
RCS file: /home2/cvsroot/ccvs/src/root.c,v
retrieving revision 1.44
diff -u -r1.44 root.c
--- root.c  2000/10/18 16:27:01 1.44
+++ root.c  2000/10/18 17:43:36
@@ -616,14 +616,12 @@
     char *cvsroot_canonical;
     char *p, *hostname;
     char port_s[11];
-    char free_port_s = 0;
-
+    
     /* get the appropriate host string */
     if (CVSroot_port || default_port)
     {
    sprintf (port_s, "%d", CVSroot_port ? CVSroot_port : default_port);
-   free_port_s = 1;
-    }
+   }
     else
     {
         strcpy(port_s, "");
@@ -643,9 +641,6 @@
     sprintf (cvsroot_canonical, ":pserver:%s@%s:%s%s",
        CVSroot_username ? CVSroot_username : default_user,
        hostname, port_s, CVSroot_directory);
-
-    if (free_port_s)
-   free (port_s);
 
     return cvsroot_canonical;
 }


-- 
.Jonathan J. Miner------------------Division of Information Technology.
|[EMAIL PROTECTED]                 University Of Wisconsin - Madison|
|608/262.9655                               Room 3149 Computer Science|
`---------------------------------------------------------------------'

 It would be possible to optimize some forms of goto, but I haven't
 bothered.
              -- Larry Wall in <[EMAIL PROTECTED]>
                                                                 (170)

_______________________________________________
Bug-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-cvs

Reply via email to