[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
several memory issues & patch
From: |
Kenneth Lorber |
Subject: |
several memory issues & patch |
Date: |
Wed, 18 Jun 2003 07:44:32 -0400 (EDT) |
4 more little fixes.
Share and Enjoy,
keni
Index: ChangeLog
===================================================================
RCS file: /cvsroot/ccvs/src/ChangeLog,v
retrieving revision 1.2475
diff -c -r1.2475 ChangeLog
*** ChangeLog 16 Jun 2003 17:11:14 -0000 1.2475
--- ChangeLog 18 Jun 2003 11:37:34 -0000
***************
*** 1,3 ****
--- 1,9 ----
+ 2003-06-18 Kenneth Lorber <keni@his.com>
+ * add.c: add() xmalloc's strlen of wrong variable
+ * checkout.c: leak: safe_location() reuses where_location without free
+ * log.c: leak: rlog_proc() exits without free of where
+ * logmsg.c: leak: do_verify() exits without free of verifymsg_script
+
2003-06-16 Derek Price <derek@ximbiot.com>
* cvs.h: Comment an #endif.
Index: add.c
===================================================================
RCS file: /cvsroot/ccvs/src/add.c,v
retrieving revision 1.85
diff -c -r1.85 add.c
*** add.c 30 Apr 2003 17:24:07 -0000 1.85
--- add.c 18 Jun 2003 11:37:34 -0000
***************
*** 575,581 ****
* There is an RCS file, so remove the "-" from the
* version number and restore the file
*/
! char *tmp = xmalloc( strlen( finfo.file ) );
(void) strcpy (tmp, vers->vn_user + 1);
(void) strcpy (vers->vn_user, tmp);
free( tmp );
--- 575,581 ----
* There is an RCS file, so remove the "-" from the
* version number and restore the file
*/
! char *tmp = xmalloc( strlen( vers->vn_user ) );
(void) strcpy (tmp, vers->vn_user + 1);
(void) strcpy (vers->vn_user, tmp);
free( tmp );
Index: checkout.c
===================================================================
RCS file: /cvsroot/ccvs/src/checkout.c,v
retrieving revision 1.111
diff -c -r1.111 checkout.c
*** checkout.c 12 Jun 2003 15:36:05 -0000 1.111
--- checkout.c 18 Jun 2003 11:37:34 -0000
***************
*** 477,482 ****
--- 477,483 ----
if( CVS_CHDIR ( where_location ) != -1 )
{
+ free( where_location );
where_location = xgetwd();
if( where_location == NULL )
error( 1, errno, "could not get working directory
(nominally `%s')", where_location );
Index: log.c
===================================================================
RCS file: /cvsroot/ccvs/src/log.c,v
retrieving revision 1.82
diff -c -r1.82 log.c
*** log.c 31 Mar 2003 19:30:56 -0000 1.82
--- log.c 18 Jun 2003 11:37:34 -0000
***************
*** 552,557 ****
--- 552,558 ----
argc - 1, argv + 1, local, which, 0, CVS_LOCK_READ,
where, 1, repository );
if ( ! ( which & W_LOCAL ) ) free (repository);
+ if (where) free (where);
return err;
}
Index: logmsg.c
===================================================================
RCS file: /cvsroot/ccvs/src/logmsg.c,v
retrieving revision 1.65
diff -c -r1.65 logmsg.c
*** logmsg.c 11 Jun 2003 18:24:57 -0000 1.65
--- logmsg.c 18 Jun 2003 11:37:34 -0000
***************
*** 560,565 ****
--- 560,566 ----
if (unlink_file (fname) < 0)
error (0, errno, "cannot remove %s", fname);
free (fname);
+ free (verifymsg_script);
}
/*
- several memory issues & patch,
Kenneth Lorber <=