From 08c3220e0444d449b4f1b7d08c7dd8b279c5936c Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Wed, 28 Dec 2005 18:27:25 +0000 Subject: don't use rf_pdata when it's not allocated. --- usr.bin/cvs/rcs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/cvs/rcs.c') 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 * 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); } -- cgit v1.2.3