diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2007-09-10 19:49:32 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2007-09-10 19:49:32 +0000 |
commit | 6655e6cfc2764db20f7539845edb28d545478731 (patch) | |
tree | d1f8cbbe301856a9ae3956d4ec3ea96a67ae9dc6 /sys/dev/systrace.c | |
parent | 3f71fb7c41bbdf67d4e062702d8b0dd91f41769b (diff) |
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; |