]> granicus.if.org Git - zfs/commitdiff
Uninitialized variable spa_autoreplace used
authorDHE <git@dehacked.net>
Tue, 15 Apr 2014 23:50:56 +0000 (19:50 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 16 Apr 2014 17:59:24 +0000 (10:59 -0700)
Caught by ztest and valgrind.

Signed-off-by: DHE <git@dehacked.net>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2259

module/zfs/spa.c

index af93b7ce5e11852787cb5a78386cef0da60ca4d7..6a5d48aab4465e54bde03b0390a93773d5baee21 100644 (file)
@@ -2549,7 +2549,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t *config,
                return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, EIO));
 
        if (error == 0) {
-               uint64_t autoreplace;
+               uint64_t autoreplace = 0;
 
                spa_prop_find(spa, ZPOOL_PROP_BOOTFS, &spa->spa_bootfs);
                spa_prop_find(spa, ZPOOL_PROP_AUTOREPLACE, &autoreplace);