diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-11-05 09:48:22 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-11-05 09:48:22 +0000 |
commit | 422d354f8c90fea170ce40abd4f03d0c82c895e9 (patch) | |
tree | fc13c077f8c2334c800342385cf3e1c859db1b4c /usr.bin/cvs/rcsparse.c | |
parent | 9d2b75ad9fc8b26c968abb5394cbc39c9008d41b (diff) |
Remove xfree(), like already done for RCS. From Michael W Bombardieri,
ok mmcc
Diffstat (limited to 'usr.bin/cvs/rcsparse.c')
-rw-r--r-- | usr.bin/cvs/rcsparse.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/cvs/rcsparse.c b/usr.bin/cvs/rcsparse.c index 23f4d67a0ea..8e5a7340127 100644 --- a/usr.bin/cvs/rcsparse.c +++ b/usr.bin/cvs/rcsparse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsparse.c,v 1.11 2014/12/01 21:58:46 deraadt Exp $ */ +/* $OpenBSD: rcsparse.c,v 1.12 2015/11/05 09:48:21 nicm Exp $ */ /* * Copyright (c) 2010 Tobias Stoeckmann <tobias@openbsd.org> * @@ -341,11 +341,10 @@ rcsparse_free(RCSFILE *rfp) pdp = rfp->rf_pdata; - if (pdp->rp_buf != NULL) - xfree(pdp->rp_buf); + free(pdp->rp_buf); if (pdp->rp_token == RCS_TYPE_REVISION) rcsnum_free(pdp->rp_value.rev); - xfree(pdp); + free(pdp); } /* @@ -610,7 +609,7 @@ rcsparse_text(RCSFILE *rfp, struct rcs_pdata *pdp) memcpy(pdp->rp_delta->rd_text, pdp->rp_buf, pdp->rp_delta->rd_tlen); } - xfree(pdp->rp_value.str); + free(pdp->rp_value.str); return (0); } @@ -708,7 +707,7 @@ rcsparse_symbols(RCSFILE *rfp, struct rcs_pdata *pdp) name = pdp->rp_value.str; if (rcsparse_token(rfp, RCS_TOK_COLON) != RCS_TOK_COLON || rcsparse_token(rfp, RCS_TYPE_NUMBER) != RCS_TYPE_NUMBER) { - xfree(name); + free(name); return (1); } symp = xmalloc(sizeof(*symp)); @@ -742,7 +741,7 @@ rcsparse_locks(RCSFILE *rfp, struct rcs_pdata *pdp) if (rcsparse_token(rfp, RCS_TOK_COLON) != RCS_TOK_COLON || rcsparse_token(rfp, RCS_TYPE_REVISION) != RCS_TYPE_REVISION) { - xfree(name); + free(name); return (1); } lkp = xmalloc(sizeof(*lkp)); |