summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmcc <mmcc@openbsd.org>2015-11-09 14:44:23 +0000
committermmcc <mmcc@openbsd.org>2015-11-09 14:44:23 +0000
commitc02c0a8a84df1ae5811c1fb1509007d7af39ca7c (patch)
tree985d6415be7ff2ef0189ab8bacf934235408b873
parentUse fstatat() when checking the files in the at queue so we (diff)
downloadwireguard-openbsd-c02c0a8a84df1ae5811c1fb1509007d7af39ca7c.tar.xz
wireguard-openbsd-c02c0a8a84df1ae5811c1fb1509007d7af39ca7c.zip
Remove xfree(). From Michael W. Bombardieri.
ok ratchov@
-rw-r--r--usr.bin/aucat/abuf.c4
-rw-r--r--usr.bin/aucat/aucat.c18
-rw-r--r--usr.bin/aucat/utils.c11
-rw-r--r--usr.bin/aucat/utils.h3
4 files changed, 12 insertions, 24 deletions
diff --git a/usr.bin/aucat/abuf.c b/usr.bin/aucat/abuf.c
index dd350769d07..d49c2961edd 100644
--- a/usr.bin/aucat/abuf.c
+++ b/usr.bin/aucat/abuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: abuf.c,v 1.26 2015/01/21 08:43:55 ratchov Exp $ */
+/* $OpenBSD: abuf.c,v 1.27 2015/11/09 14:44:23 mmcc Exp $ */
/*
* Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -62,7 +62,7 @@ abuf_done(struct abuf *buf)
}
}
#endif
- xfree(buf->data);
+ free(buf->data);
buf->data = (void *)0xdeadbeef;
}
diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c
index 19b231a18c7..4f3f525ac5a 100644
--- a/usr.bin/aucat/aucat.c
+++ b/usr.bin/aucat/aucat.c
@@ -214,7 +214,7 @@ slot_new(char *path, int mode, struct aparams *par, int hdr,
if (!afile_open(&s->afile, path, hdr,
mode == SIO_PLAY ? AFILE_FREAD : AFILE_FWRITE,
par, rate, cmax - cmin + 1)) {
- xfree(s);
+ free(s);
return 0;
}
s->cmin = cmin;
@@ -413,15 +413,13 @@ slot_del(struct slot *s)
}
#endif
abuf_done(&s->buf);
- if (s->resampbuf)
- xfree(s->resampbuf);
- if (s->convbuf)
- xfree(s->convbuf);
+ free(s->resampbuf);
+ free(s->convbuf);
}
for (ps = &slot_list; *ps != s; ps = &(*ps)->next)
; /* nothing */
*ps = s->next;
- xfree(s);
+ free(s);
}
static int
@@ -672,9 +670,9 @@ dev_close(void)
if (dev_mh)
mio_close(dev_mh);
if (dev_mode & SIO_PLAY)
- xfree(dev_pbuf);
+ free(dev_pbuf);
if (dev_mode & SIO_REC)
- xfree(dev_rbuf);
+ free(dev_rbuf);
}
static void
@@ -999,7 +997,7 @@ offline(void)
slot_list_copy(todo, dev_pchan, dev_pbuf);
slot_list_iodo();
}
- xfree(dev_pbuf);
+ free(dev_pbuf);
while (slot_list)
slot_del(slot_list);
return 1;
@@ -1148,7 +1146,7 @@ playrec(char *dev, int mode, int bufsz, char *port)
if (dev_pstate == DEV_START)
dev_mmcstop();
- xfree(pfds);
+ free(pfds);
dev_close();
while (slot_list)
slot_del(slot_list);
diff --git a/usr.bin/aucat/utils.c b/usr.bin/aucat/utils.c
index b4e1f3133d1..f97db8d22e9 100644
--- a/usr.bin/aucat/utils.c
+++ b/usr.bin/aucat/utils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.c,v 1.1 2015/01/21 08:43:55 ratchov Exp $ */
+/* $OpenBSD: utils.c,v 1.2 2015/11/09 14:44:23 mmcc Exp $ */
/*
* Copyright (c) 2003-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -158,15 +158,6 @@ xmalloc(size_t size)
}
/*
- * free memory allocated with xmalloc()
- */
-void
-xfree(void *p)
-{
- free(p);
-}
-
-/*
* xmalloc-style strdup(3)
*/
char *
diff --git a/usr.bin/aucat/utils.h b/usr.bin/aucat/utils.h
index 951df5e3e74..363ff4a7fcf 100644
--- a/usr.bin/aucat/utils.h
+++ b/usr.bin/aucat/utils.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.h,v 1.1 2015/01/21 08:43:55 ratchov Exp $ */
+/* $OpenBSD: utils.h,v 1.2 2015/11/09 14:44:23 mmcc Exp $ */
/*
* Copyright (c) 2003-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -29,7 +29,6 @@ void log_flush(void);
void *xmalloc(size_t);
char *xstrdup(char *);
-void xfree(void *);
/*
* Log levels: