summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2005-12-28 18:27:25 +0000
committerJoris Vink <joris@cvs.openbsd.org>2005-12-28 18:27:25 +0000
commit08c3220e0444d449b4f1b7d08c7dd8b279c5936c (patch)
treec0b1279ca510c4d95e81c87868885029d98b71b4 /usr.bin
parent249e00cc7ea896891aafd6ea7923600010bc13ff (diff)
don't use rf_pdata when it's not allocated.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/rcs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index b7a5eb25a82..b4b348f5b67 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.117 2005/12/27 16:05:20 niallo Exp $ */
+/* $OpenBSD: rcs.c,v 1.118 2005/12/28 18:27:24 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -430,7 +430,8 @@ rcs_close(RCSFILE *rfp)
xfree(rfp->rf_expand);
if (rfp->rf_desc != NULL)
xfree(rfp->rf_desc);
- rcs_freepdata(rfp->rf_pdata);
+ if (rfp->rf_pdata != NULL)
+ rcs_freepdata(rfp->rf_pdata);
xfree(rfp);
}