[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/src ChangeLog client.c
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/src ChangeLog client.c |
Date: |
Tue, 16 Sep 2008 19:33:40 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Changes by: Derek Robert Price <dprice> 08/09/16 19:33:40
Modified files:
src : ChangeLog client.c
Log message:
* client.c (arg_should_not_be_sent_to_server): Avoid memory leak.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3586&r2=1.3587
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/client.c?cvsroot=cvs&r1=1.472&r2=1.473
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3586
retrieving revision 1.3587
diff -u -b -r1.3586 -r1.3587
--- ChangeLog 16 Sep 2008 19:24:39 -0000 1.3586
+++ ChangeLog 16 Sep 2008 19:33:39 -0000 1.3587
@@ -1,5 +1,7 @@
2008-09-16 Derek R. Price <address@hidden>
+ * client.c (arg_should_not_be_sent_to_server): Avoid memory leak.
+
* client.c (arg_should_not_be_sent_to_server): Simplify.
* subr.c (update_dir_name): New function.
* subr.h (update_dir_name): Prototype for same.
Index: client.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/client.c,v
retrieving revision 1.472
retrieving revision 1.473
diff -u -b -r1.472 -r1.473
--- client.c 16 Sep 2008 19:24:40 -0000 1.472
+++ client.c 16 Sep 2008 19:33:39 -0000 1.473
@@ -145,6 +145,9 @@
static bool
arg_should_not_be_sent_to_server (char *arg)
{
+ const char *root_string;
+ char *dir;
+
/* Decide if we should send this directory name to the server. We
* should always send argv[i] if:
*
@@ -158,7 +161,6 @@
*
* 4) the argument is a file in the CWD and the CWD is checked out
* from the current root
- *
*/
if (list_isempty (dirs_sent_to_server))
@@ -186,9 +188,8 @@
* whether we should send arg to the server by checking the contents of
* ARGS's parent directory's CVSADM dir, if it exists.
*/
- {
- const char *root_string;
- char *dir = dir_name (arg);
+
+ dir = dir_name (arg);
/* First, check to see if we already sent this directory to the server,
* because it takes less time than actually opening the stuff in the
@@ -211,13 +212,13 @@
root_string = this_root->original;
free (update_dir);
}
+ free (dir);
/* Now check the value for root. */
if (root_string && current_parsed_root
&& !STREQ (root_string, original_parsed_root->original))
/* Don't send this, since the CVSROOTs don't match. */
return true;
- }
/* OK, let's send it. */
return false;
- [Cvs-cvs] ccvs/src ChangeLog client.c, Derek Robert Price, 2008/09/09
- [Cvs-cvs] ccvs/src ChangeLog client.c, Derek Robert Price, 2008/09/15
- [Cvs-cvs] ccvs/src ChangeLog client.c, Derek Robert Price, 2008/09/16
- [Cvs-cvs] ccvs/src ChangeLog client.c,
Derek Robert Price <=
- [Cvs-cvs] ccvs/src ChangeLog client.c, Derek Robert Price, 2008/09/16
- [Cvs-cvs] ccvs/src ChangeLog client.c, Derek Robert Price, 2008/09/29
- [Cvs-cvs] ccvs/src ChangeLog client.c, Derek Robert Price, 2008/09/29