Author: pjd
Date: Thu Jul  2 10:57:34 2015
New Revision: 285024
URL: https://svnweb.freebsd.org/changeset/base/285024

Log:
  Properly propagate errors in metadata reading.
  
  PR:           198860
  Submitted by: Matthew D. Fuller

Modified:
  head/sys/geom/eli/g_eli.c

Modified: head/sys/geom/eli/g_eli.c
==============================================================================
--- head/sys/geom/eli/g_eli.c   Thu Jul  2 10:55:32 2015        (r285023)
+++ head/sys/geom/eli/g_eli.c   Thu Jul  2 10:57:34 2015        (r285024)
@@ -633,7 +633,10 @@ g_eli_read_metadata(struct g_class *mp, 
        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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to