Properly propagate errors in metadata reading.

PR:		198860
Submitted by:	Matthew D. Fuller
This commit is contained in:
Pawel Jakub Dawidek 2015-07-02 10:57:34 +00:00
parent edaa9008ff
commit fefb6a143a

View File

@ -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);