diff options
author | Peter Dennis - Sustaining Engineer <Peter.Dennis@Sun.COM> | 2008-10-06 17:00:12 +0100 |
---|---|---|
committer | Peter Dennis - Sustaining Engineer <Peter.Dennis@Sun.COM> | 2008-10-06 17:00:12 +0100 |
commit | 2791f8b95893f7d64b6f89703e7af240aa84a33f (patch) | |
tree | be5878141c9ba87cfcd52894721d2cbf13e1ce07 /usr/src/lib/lvm | |
parent | 34c2beb6189b56e50886fbb255cbb90ef9a0c77c (diff) | |
download | illumos-joyent-2791f8b95893f7d64b6f89703e7af240aa84a33f.tar.gz |
6713198 metaset dumps core if -l 56 is specified
6735303 meta_*_check_component frees random memory
Diffstat (limited to 'usr/src/lib/lvm')
-rw-r--r-- | usr/src/lib/lvm/libmeta/common/meta_db_balance.c | 12 | ||||
-rw-r--r-- | usr/src/lib/lvm/libmeta/common/meta_raid.c | 7 | ||||
-rw-r--r-- | usr/src/lib/lvm/libmeta/common/meta_sp.c | 8 | ||||
-rw-r--r-- | usr/src/lib/lvm/libmeta/common/meta_stripe.c | 6 |
4 files changed, 15 insertions, 18 deletions
diff --git a/usr/src/lib/lvm/libmeta/common/meta_db_balance.c b/usr/src/lib/lvm/libmeta/common/meta_db_balance.c index d4860ad263..f908920f36 100644 --- a/usr/src/lib/lvm/libmeta/common/meta_db_balance.c +++ b/usr/src/lib/lvm/libmeta/common/meta_db_balance.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Database location balancing code. */ @@ -374,9 +372,8 @@ add_replica_to_ctl( } if (add_replica(sp, d->drv_dnp, (d->drv_dbcnt + 1), d->drv_dbsize, ep) == -1) { - md_error_t nep; + md_error_t nep = mdnullerror; - mdclrerror(&nep); if (d->drv_dbcnt) { /* * We have to to bring the replica @@ -394,6 +391,7 @@ add_replica_to_ctl( &nep) == -1) { c->ctl_dbcnt -= d->drv_dbcnt; d->drv_dbcnt = 0; + mdclrerror(&nep); } } @@ -729,11 +727,13 @@ count_replica_on_ctl( if (adding) { mdpart_t *partp; uint_t rep_slice; - md_error_t mde; + md_error_t mde = mdnullerror; if (meta_replicaslice(d->drv_dnp, - &rep_slice, &mde) != 0) + &rep_slice, &mde) != 0) { + mdclrerror(&mde); continue; + } partp = &d->drv_dnp->vtoc.parts[rep_slice]; if (! partp) diff --git a/usr/src/lib/lvm/libmeta/common/meta_raid.c b/usr/src/lib/lvm/libmeta/common/meta_raid.c index fda06a04be..846b8b1d1f 100644 --- a/usr/src/lib/lvm/libmeta/common/meta_raid.c +++ b/usr/src/lib/lvm/libmeta/common/meta_raid.c @@ -23,7 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" /* * Just in case we're not in a build environment, make sure that * TEXT_DOMAIN gets set to something. @@ -2792,9 +2791,9 @@ meta_raid_check_component( char *miscname; md_dev64_t *mydev = NULL; mdkey_t key; - char *pname, *t; - char *ctd_name; - char *devname; + char *pname = NULL, *t; + char *ctd_name = NULL; + char *devname = NULL; int len; int i; int rval = -1; diff --git a/usr/src/lib/lvm/libmeta/common/meta_sp.c b/usr/src/lib/lvm/libmeta/common/meta_sp.c index c724955546..7fc6396a53 100644 --- a/usr/src/lib/lvm/libmeta/common/meta_sp.c +++ b/usr/src/lib/lvm/libmeta/common/meta_sp.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Just in case we're not in a build environment, make sure that * TEXT_DOMAIN gets set to something. @@ -6699,9 +6697,9 @@ meta_sp_check_component( side_t sideno; char *miscname; md_dev64_t *mydev = NULL; - char *pname, *t; - char *ctd_name; - char *devname; + char *pname = NULL, *t; + char *ctd_name = NULL; + char *devname = NULL; int len; int rval = -1; diff --git a/usr/src/lib/lvm/libmeta/common/meta_stripe.c b/usr/src/lib/lvm/libmeta/common/meta_stripe.c index b8a9dd68c4..278a544e04 100644 --- a/usr/src/lib/lvm/libmeta/common/meta_stripe.c +++ b/usr/src/lib/lvm/libmeta/common/meta_stripe.c @@ -2539,9 +2539,9 @@ meta_stripe_check_component( char *miscname; md_dev64_t *mydev = NULL; mdkey_t key; - char *pname, *t; - char *ctd_name; - char *devname; + char *pname = NULL, *t; + char *ctd_name = NULL; + char *devname = NULL; int len; int cnt, i; int rval = -1; |