diff options
author | 2007-09-10 19:49:31 +0000 | |
---|---|---|
committer | 2007-09-10 19:49:31 +0000 | |
commit | 3236401f3365d48ea1e91e42763514a9b7f805bc (patch) | |
tree | 5841836507ca4510564faa8d1ca8f6fcc3d41337 /sys/dev/systrace.c | |
parent | Use erealloc3() in more_aliases() instead of malloc/realloc. (diff) | |
download | wireguard-openbsd-3236401f3365d48ea1e91e42763514a9b7f805bc.tar.xz wireguard-openbsd-3236401f3365d48ea1e91e42763514a9b7f805bc.zip |
more MALLOC/FREE -> malloc/free and M_ZERO changes
ok pyr@
Diffstat (limited to 'sys/dev/systrace.c')
-rw-r--r-- | sys/dev/systrace.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c index 2ab5a06512c..5546815917c 100644 --- a/sys/dev/systrace.c +++ b/sys/dev/systrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: systrace.c,v 1.44 2007/03/15 10:22:30 art Exp $ */ +/* $OpenBSD: systrace.c,v 1.45 2007/09/10 19:49:31 gilles Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -494,7 +494,7 @@ systracef_close(fp, p) vrele(fst->fd_rdir); rw_exit_write(&fst->lock); - FREE(fp->f_data, M_XDATA); + free(fp->f_data, M_XDATA); fp->f_data = NULL; return (0); @@ -562,10 +562,8 @@ systraceioctl(dev, cmd, data, flag, p) switch (cmd) { case STRIOCCLONE: - MALLOC(fst, struct fsystrace *, sizeof(struct fsystrace), - M_XDATA, M_WAITOK); - - memset(fst, 0, sizeof(struct fsystrace)); + fst = (struct fsystrace *)malloc(sizeof(struct fsystrace), + M_XDATA, M_WAITOK|M_ZERO); rw_init(&fst->lock, "systrace"); TAILQ_INIT(&fst->processes); TAILQ_INIT(&fst->messages); @@ -578,7 +576,7 @@ systraceioctl(dev, cmd, data, flag, p) error = falloc(p, &f, &fd); if (error) { - FREE(fst, M_XDATA); + free(fst, M_XDATA); return (error); } f->f_flag = FREAD | FWRITE; |