summaryrefslogtreecommitdiff
path: root/sys/arch/zaurus/dev
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-10-03 10:52:12 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-10-03 10:52:12 +0000
commit91e049d131acb98a8b3ff54ab8f882b27b354479 (patch)
tree2ccb5b9450d014d6731c31bc458bcc57a8a15916 /sys/arch/zaurus/dev
parenta2f23a0f4539991c8472613441751eead15267e9 (diff)
MALLOC+bzero -> malloc+M_ZERO.
In ip_esp.c all allocated memory is now zero'd in the "malloc(sizeof(*tc) + alen ..." case. The +alen memory was not initialized by the bzero() call. Noticed by chl@. "Looks good" art@ "seems ok" chl@
Diffstat (limited to 'sys/arch/zaurus/dev')
-rw-r--r--sys/arch/zaurus/dev/zaurus_flash.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/arch/zaurus/dev/zaurus_flash.c b/sys/arch/zaurus/dev/zaurus_flash.c
index 5f2af195799..0568ad4b720 100644
--- a/sys/arch/zaurus/dev/zaurus_flash.c
+++ b/sys/arch/zaurus/dev/zaurus_flash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_flash.c,v 1.4 2007/06/20 18:15:46 deraadt Exp $ */
+/* $OpenBSD: zaurus_flash.c,v 1.5 2007/10/03 10:52:11 krw Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org>
@@ -622,12 +622,10 @@ zflash_safe_start(struct zflash_softc *sc, dev_t dev)
if (DL_GETPOFFSET(&lp->d_partitions[part]) % blksect)
return EIO;
- MALLOC(sp, struct zflash_safe *, sizeof(struct zflash_safe),
- M_DEVBUF, M_NOWAIT);
+ sp = malloc(sizeof(*sp), M_DEVBUF, M_NOWAIT | M_ZERO);
if (sp == NULL)
return ENOMEM;
- bzero(sp, sizeof(struct zflash_safe));
sp->sp_dev = dev;
sp->sp_pblks = DL_GETPSIZE(&lp->d_partitions[part]) / blksect;