summaryrefslogtreecommitdiff
path: root/usr.bin/rcs/buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/rcs/buf.c')
-rw-r--r--usr.bin/rcs/buf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/rcs/buf.c b/usr.bin/rcs/buf.c
index 7c7931567d9..24d9427862b 100644
--- a/usr.bin/rcs/buf.c
+++ b/usr.bin/rcs/buf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buf.c,v 1.25 2015/06/13 20:15:21 nicm Exp $ */
+/* $OpenBSD: buf.c,v 1.26 2015/11/02 16:45:21 nicm Exp $ */
/*
* Copyright (c) 2003 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -138,6 +138,8 @@ out:
void
buf_free(BUF *b)
{
+ if (b == NULL)
+ return;
free(b->cb_buf);
free(b);
}