diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-06-13 20:15:22 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-06-13 20:15:22 +0000 |
commit | 6a6766148db807a069e16c48fca4c3253abbf378 (patch) | |
tree | 1981355a5452a2a7b97c0df4885b1c75b0308a4d /usr.bin/rcs/rcsparse.c | |
parent | 9c4591a62e17c9a56dc4fea7cd0faa1d451a0028 (diff) |
Convert xfree to free. From Fritjof Bornebusch. ok deraadt
Diffstat (limited to 'usr.bin/rcs/rcsparse.c')
-rw-r--r-- | usr.bin/rcs/rcsparse.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/rcs/rcsparse.c b/usr.bin/rcs/rcsparse.c index 2328482d29f..0c02edfedf7 100644 --- a/usr.bin/rcs/rcsparse.c +++ b/usr.bin/rcs/rcsparse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsparse.c,v 1.14 2014/12/01 21:58:46 deraadt Exp $ */ +/* $OpenBSD: rcsparse.c,v 1.15 2015/06/13 20:15:21 nicm Exp $ */ /* * Copyright (c) 2010 Tobias Stoeckmann <tobias@openbsd.org> * @@ -340,11 +340,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); } /* @@ -609,7 +608,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); } @@ -707,7 +706,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)); @@ -741,7 +740,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)); |