summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/file.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2005-03-26 08:09:55 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2005-03-26 08:09:55 +0000
commit10f69d3519037e21b125297ff9a1d2ada4b05689 (patch)
treec3cb52b820a8e4a141d1df7da121b74760a9b099 /usr.bin/cvs/file.c
parent06017e9ab1819366226e087c1fb8560116614c61 (diff)
fix a variety of things i found at coverity. ok joris@
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r--usr.bin/cvs/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index 5365a8c2776..3262a65171a 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.57 2005/03/24 14:35:18 jfb Exp $ */
+/* $OpenBSD: file.c,v 1.58 2005/03/26 08:09:54 tedu Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -832,6 +832,7 @@ cvs_file_alloc(const char *path, u_int type)
cfp->cf_name = cvs_strdup(basename(path));
if (cfp->cf_name == NULL) {
cvs_log(LP_ERR, "failed to copy file name");
+ cvs_file_free(cfp);
return (NULL);
}
cfp->cf_type = type;