From 6f39832c711187f3351bf796bc4bf74bf292f7dc Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sun, 7 Jan 2001 20:52:42 +0000 Subject: [PATCH] This cannot possibly be right: foo(int *nret) { for (i = 0; i < nret; i++) { free(array[i], .... Fix to do the logically correct thing.. (s/nret/*nret/) --- sys/dev/cardbus/cardbus_cis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c index 8d2059b64758..7d80108d7ac1 100644 --- a/sys/dev/cardbus/cardbus_cis.c +++ b/sys/dev/cardbus/cardbus_cis.c @@ -565,9 +565,9 @@ void cardbus_cis_free(device_t dev, struct cis_tupleinfo *buff, int* nret) { int i; - for (i = 0; i < nret; i++) + for (i = 0; i < *nret; i++) free(buff[i].data, M_DEVBUF); - if (nret > 0) + if (*nret > 0) free(buff, M_DEVBUF); }