Put a bandaid on the NULL pointer dereference caused by doing an

"update -jHEAD" when a file has been added on the specified tag.

It doesn't actually make cvs 'handle' it, it just stops it from dying
and leaving stray locks and other wreckage.

This was suggested by the CVS maintainers, and is in cvs-1.5.1-950901.
This commit is contained in:
Peter Wemm 1995-09-03 05:05:31 +00:00
parent 8f5e8b4359
commit 608eba4889
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10535

View File

@ -1022,8 +1022,9 @@ join_file (file, srcfiles, vers, update_dir, entries)
}
}
/* skip joining identical revs */
if (strcmp (rev2, vers->vn_user) == 0) /* no merge necessary */
/* skip joining identical revs or if the file is not present */
if (vers->vn_user == NULL ||
strcmp (rev2, vers->vn_user) == 0) /* no merge necessary */
{
free (rev2);
return;