summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/getlog.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/getlog.c
parent06017e9ab1819366226e087c1fb8560116614c61 (diff)
fix a variety of things i found at coverity. ok joris@
Diffstat (limited to 'usr.bin/cvs/getlog.c')
-rw-r--r--usr.bin/cvs/getlog.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/cvs/getlog.c b/usr.bin/cvs/getlog.c
index b9800d66720..7242718b2a3 100644
--- a/usr.bin/cvs/getlog.c
+++ b/usr.bin/cvs/getlog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getlog.c,v 1.14 2005/02/27 00:22:08 jfb Exp $ */
+/* $OpenBSD: getlog.c,v 1.15 2005/03/26 08:09:54 tedu Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -195,7 +195,8 @@ cvs_getlog_file(CVSFILE *cf, void *arg)
rf = rcs_open(fpath, RCS_READ);
if (rf == NULL) {
- cvs_ent_free(entp);
+ if (entp != NULL)
+ cvs_ent_free(entp);
return (-1);
}