summaryrefslogtreecommitdiff
path: root/sys/arch/zaurus
diff options
context:
space:
mode:
authorSebastien Marie <semarie@cvs.openbsd.org>2015-09-27 10:12:10 +0000
committerSebastien Marie <semarie@cvs.openbsd.org>2015-09-27 10:12:10 +0000
commit166a246a1e0cde4330bb300d8f19c17bda088428 (patch)
treef9456e2eeaabb2818172ff456137985341e5f5b3 /sys/arch/zaurus
parent966e7350f8c07b33900038be562b3476b9ef901e (diff)
free(x, 0) cleanup:
- set size argument of free() - remove pointless if expression around free() call ok guenther@
Diffstat (limited to 'sys/arch/zaurus')
-rw-r--r--sys/arch/zaurus/dev/zaurus_flash.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/arch/zaurus/dev/zaurus_flash.c b/sys/arch/zaurus/dev/zaurus_flash.c
index 1a474642718..32a12999e90 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.13 2014/07/12 18:44:43 tedu Exp $ */
+/* $OpenBSD: zaurus_flash.c,v 1.14 2015/09/27 10:12:09 semarie Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org>
@@ -583,15 +583,13 @@ zflash_write_strategy(struct zflash_softc *sc, struct buf *bp,
}
bp->b_resid = bp->b_bcount - sc->sc_flash.sc_flashdev->pagesize;
- free(oob, M_DEVBUF, 0);
- free(buf, M_DEVBUF, 0);
+ free(oob, M_DEVBUF, oobsize);
+ free(buf, M_DEVBUF, bufsize);
return;
bad:
bp->b_flags |= B_ERROR;
- if (oob != NULL)
- free(oob, M_DEVBUF, 0);
- if (buf != NULL)
- free(buf, M_DEVBUF, 0);
+ free(oob, M_DEVBUF, oobsize);
+ free(buf, M_DEVBUF, bufsize);
}
int