From b0805b27d5bd10b44106a3aa3dd9e99d58aeaaf7 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Fri, 22 Feb 2002 23:43:32 +0000 Subject: [PATCH] Call @xfree@ rather than @free@. Organization: Straylight/Edgeware From: mdw --- exec.c | 17 ++++++++++------- file.c | 13 ++++++++----- identify.c | 7 +++++-- un.c | 7 +++++-- 4 files changed, 28 insertions(+), 16 deletions(-) diff --git a/exec.c b/exec.c index 28c9cd8..1f0102b 100644 --- a/exec.c +++ b/exec.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: exec.c,v 1.5 2002/01/13 14:49:03 mdw Exp $ + * $Id: exec.c,v 1.6 2002/02/22 23:43:32 mdw Exp $ * * Source and target for executable programs * @@ -29,6 +29,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: exec.c,v $ + * Revision 1.6 2002/02/22 23:43:32 mdw + * Call @xfree@ rather than @free@. + * * Revision 1.5 2002/01/13 14:49:03 mdw * Track @lbuf@ changes in mLib. * @@ -474,9 +477,9 @@ static void xenv_destroy(xenv *xe) while (xe) { xenv *xxe = xe; xe = xe->next; - free(xxe->name); + xfree(xxe->name); if (xxe->value) - free(xxe->value); + xfree(xxe->value); DESTROY(xxe); } } @@ -497,7 +500,7 @@ static void x_tidy(xargs *xa, xopts *xo) { xa->ref--; if (!xa->ref) - free(xa); + xfree(xa); xo->ref--; if (!xo->ref) { @@ -703,7 +706,7 @@ static void xept_destroy(xept *xe) else xept_list = xe->next; - free(xe->desc); + xfree(xe->desc); if (xe->f) xe->f->ops->close(xe->f); x_tidy(xe->xa, xe->xo); @@ -1115,7 +1118,7 @@ tidy: static void xsource_destroy(source *s) { xsource *xs = (xsource *)s; - free(xs->s.desc); + xfree(xs->s.desc); exec_destroy(&xs->x); DESTROY(xs); } @@ -1169,7 +1172,7 @@ static endpt *xtarget_create(target *t, const char *desc) static void xtarget_destroy(target *t) { xtarget *xt = (xtarget *)t; - free(xt->t.desc); + xfree(xt->t.desc); exec_destroy(&xt->x); DESTROY(xt); } diff --git a/file.c b/file.c index 60a233d..7c78645 100644 --- a/file.c +++ b/file.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: file.c,v 1.4 2001/02/03 20:30:03 mdw Exp $ + * $Id: file.c,v 1.5 2002/02/22 23:43:32 mdw Exp $ * * File source and target * @@ -29,6 +29,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: file.c,v $ + * Revision 1.5 2002/02/22 23:43:32 mdw + * Call @xfree@ rather than @free@. + * * Revision 1.4 2001/02/03 20:30:03 mdw * Support re-reading config files on SIGHUP. * @@ -477,9 +480,9 @@ static endpt *file_endpt(fdata *f, const char *desc) static void file_destroy(fdata *f) { if (f->in.type == FTYPE_NAME) - free(f->in.u.name); + xfree(f->in.u.name); if (f->out.type == FTYPE_NAME) - free(f->out.u.name); + xfree(f->out.u.name); } /*----- File source description -------------------------------------------*/ @@ -549,7 +552,7 @@ tidy: static void fsource_destroy(source *s) { fsource *fs = (fsource *)s; - free(fs->s.desc); + xfree(fs->s.desc); file_destroy(&fs->f); DESTROY(fs); } @@ -604,7 +607,7 @@ static void ftarget_destroy(target *t) { ftarget *ft = (ftarget *)t; file_destroy(&ft->f); - free(ft->t.desc); + xfree(ft->t.desc); DESTROY(ft); } diff --git a/identify.c b/identify.c index 87ba126..265c071 100644 --- a/identify.c +++ b/identify.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: identify.c,v 1.6 2001/06/22 19:36:49 mdw Exp $ + * $Id: identify.c,v 1.7 2002/02/22 23:43:32 mdw Exp $ * * Identifies and logs the client of a connection * @@ -29,6 +29,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: identify.c,v $ + * Revision 1.7 2002/02/22 23:43:32 mdw + * Call @xfree@ rather than @free@. + * * Revision 1.6 2001/06/22 19:36:49 mdw * Enlarge the identity buffer. * @@ -137,7 +140,7 @@ static void id_done(id *i) /* --- Dispose of the block --- */ REFFD_DEC(i->q.r); - free(i); + xfree(i); } /* --- @id_res@ --- * diff --git a/un.c b/un.c index 8740b81..e120f95 100644 --- a/un.c +++ b/un.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: un.c,v 1.4 2000/08/01 17:59:56 mdw Exp $ + * $Id: un.c,v 1.5 2002/02/22 23:43:32 mdw Exp $ * * Protocol specific definitions for Unix-domain sockets * @@ -29,6 +29,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: un.c,v $ + * Revision 1.5 2002/02/22 23:43:32 mdw + * Call @xfree@ rather than @free@. + * * Revision 1.4 2000/08/01 17:59:56 mdw * Switch over to using `size_t' for socket address lengths. * @@ -115,7 +118,7 @@ static addr *un_read(scanner *sc, unsigned type) static void un_destroy(addr *a) { un_addr *ua = (un_addr *)a; - free(ua); + xfree(ua); } /* --- @print@ --- */ -- [mdw]