diff options
author | pjd <pjd@FreeBSD.org> | 2015-07-02 10:57:34 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2015-07-02 10:57:34 +0000 |
commit | 8a028f1c90af54c64caa7307ca2359c1584884c4 (patch) | |
tree | 515ccd2c4a0a78b0becc62756e3adc0197f6cbed /sys/geom/eli/g_eli.c | |
parent | 7d4cefa99598b5167956707b2c741fca0bea0408 (diff) | |
download | FreeBSD-src-8a028f1c90af54c64caa7307ca2359c1584884c4.zip FreeBSD-src-8a028f1c90af54c64caa7307ca2359c1584884c4.tar.gz |
Properly propagate errors in metadata reading.
PR: 198860
Submitted by: Matthew D. Fuller
Diffstat (limited to 'sys/geom/eli/g_eli.c')
-rw-r--r-- | sys/geom/eli/g_eli.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c index 84c2e95..6eea018 100644 --- a/sys/geom/eli/g_eli.c +++ b/sys/geom/eli/g_eli.c @@ -633,7 +633,10 @@ g_eli_read_metadata(struct g_class *mp, struct g_provider *pp, g_topology_lock(); if (buf == NULL) goto end; - eli_metadata_decode(buf, md); + error = eli_metadata_decode(buf, md); + if (error != 0) + goto end; + /* Metadata was read and decoded successfully. */ end: if (buf != NULL) g_free(buf); |