chiark / gitweb /
Various new source files.
[mLib] / bres.c
diff --git a/bres.c b/bres.c
index 99bf051135d16d9fe76d343df84aeac3194f04aa..497115317bbf47f664abd37b8c0a85e56222b682 100644 (file)
--- a/bres.c
+++ b/bres.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: bres.c,v 1.2 1999/10/30 11:28:39 mdw Exp $
+ * $Id: bres.c,v 1.3 2000/06/17 10:38:35 mdw Exp $
  *
  * Background reverse name resolution
  *
@@ -30,6 +30,9 @@
 /*----- 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.
  *
@@ -316,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
   }
@@ -337,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);
 }
@@ -596,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);
@@ -663,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)
@@ -854,7 +857,7 @@ again:
 lost:
   rc->func(0, rc->p);
   if (rc->q == BRES_BYNAME)
-    free(rc->u.name);
+    xfree(rc->u.name);
 }
 
 /* --- @resolve@ --- *