Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jul 2015 10:57:34 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r285024 - head/sys/geom/eli
Message-ID:  <201507021057.t62AvYVR071923@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507021057.t62AvYVR071923>