X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/a759efa6dcc67b035726a4428157c35627653966..7d40699f4637918fb31816253c8f68921b3acbed:/bres.c diff --git a/bres.c b/bres.c index c482262..4971153 100644 --- a/bres.c +++ b/bres.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: bres.c,v 1.1 1999/10/04 21:40:42 mdw Exp $ + * $Id: bres.c,v 1.3 2000/06/17 10:38:35 mdw Exp $ * * Background reverse name resolution * @@ -30,6 +30,12 @@ /*----- Revision history --------------------------------------------------* * * $Log: bres.c,v $ + * Revision 1.3 2000/06/17 10:38:35 mdw + * Track changes to selbuf interface. + * + * Revision 1.2 1999/10/30 11:28:39 mdw + * Fix include error, pointed out by Chris Rutter. + * * Revision 1.1 1999/10/04 21:40:42 mdw * Added background resolver from `fw'. * @@ -53,11 +59,10 @@ #include #include -#include -#include -#include - +#include "alloc.h" #include "bres.h" +#include "report.h" +#include "sel.h" /*----- Magic numbers -----------------------------------------------------*/ @@ -314,15 +319,15 @@ static struct hostent *gethost(int fd) h->h_name = a; PUT(name); - free(name); + xfree(name); h->h_aliases = p; for (i = 0; i < hsk.nalias; i++) { *p++ = a; PUT(alias[i]); - free(alias[i]); + xfree(alias[i]); } *p++ = 0; - free(alias); + xfree(alias); #undef PUT } @@ -335,11 +340,11 @@ tidy_2: { int i; for (i = 0; i < hsk.nalias && alias[i]; i++) - free(alias[i]); - free(alias); + xfree(alias[i]); + xfree(alias); } tidy_1: - free(name); + xfree(name); tidy_0: return (0); } @@ -594,7 +599,7 @@ static void zap(bres_server *rs) void bres_abort(bres_client *rc) { if (rc->q == BRES_BYNAME) - free(rc->u.name); + xfree(rc->u.name); if (rc->rs) { sel_rmfile(&rc->rs->f); zap(rc->rs); @@ -661,10 +666,10 @@ static void answer(int fd, unsigned mode, void *vp) if (rc) { rc->func(h, rc->p); if (rc->q == BRES_BYNAME) - free(rc->u.name); + xfree(rc->u.name); } if (h) - free(h); + xfree(h); if (fail) zap(rs); if (!rc) @@ -852,7 +857,7 @@ again: lost: rc->func(0, rc->p); if (rc->q == BRES_BYNAME) - free(rc->u.name); + xfree(rc->u.name); } /* --- @resolve@ --- *