diff options
author | peter <peter@FreeBSD.org> | 2001-01-07 20:52:42 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-01-07 20:52:42 +0000 |
commit | f54ce113df1b470b2af6d448422510e76dc189f2 (patch) | |
tree | f313c17852368465baeaeda07a33ab1be20a121c /sys/dev/cardbus/cardbus_cis.c | |
parent | b64cf67abd4baaee84ca02edc61270d2936ab1bf (diff) | |
download | FreeBSD-src-f54ce113df1b470b2af6d448422510e76dc189f2.zip FreeBSD-src-f54ce113df1b470b2af6d448422510e76dc189f2.tar.gz |
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/)
Diffstat (limited to 'sys/dev/cardbus/cardbus_cis.c')
-rw-r--r-- | sys/dev/cardbus/cardbus_cis.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c index 8d2059b..7d80108 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); } |