=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/buf.c,v retrieving revision 1.24 retrieving revision 1.25 diff -c -r1.24 -r1.25 *** src/usr.bin/rcs/buf.c 2015/02/05 12:59:58 1.24 --- src/usr.bin/rcs/buf.c 2015/06/13 20:15:21 1.25 *************** *** 1,4 **** ! /* $OpenBSD: buf.c,v 1.24 2015/02/05 12:59:58 millert Exp $ */ /* * Copyright (c) 2003 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: buf.c,v 1.25 2015/06/13 20:15:21 nicm Exp $ */ /* * Copyright (c) 2003 Jean-Francois Brousseau * All rights reserved. *************** *** 32,37 **** --- 32,38 ---- #include #include #include + #include #include #include *************** *** 137,151 **** void buf_free(BUF *b) { ! if (b->cb_buf != NULL) ! xfree(b->cb_buf); ! xfree(b); } /* * Free the buffer 's structural information but do not free the contents * of the buffer. Instead, they are returned and should be freed later using ! * xfree(). */ void * buf_release(BUF *b) --- 138,151 ---- void buf_free(BUF *b) { ! free(b->cb_buf); ! free(b); } /* * Free the buffer 's structural information but do not free the contents * of the buffer. Instead, they are returned and should be freed later using ! * free(). */ void * buf_release(BUF *b) *************** *** 153,159 **** void *tmp; tmp = b->cb_buf; ! xfree(b); return (tmp); } --- 153,159 ---- void *tmp; tmp = b->cb_buf; ! free(b); return (tmp); }