Markus Armbruster bc0e339b01 hw/core: Fix fit_load_fdt() error API violations
fit_load_fdt() passes @errp to fit_image_addr(), then recovers from
ENOENT failures.  Passing @errp is wrong, because it works only as
long as @errp is neither @error_fatal nor @error_abort.  Error
recovery dereferences @errp.  That's also wrong; see the big comment
in error.h.  Error recovery can leave *errp pointing to a freed
Error object.  Wrong, it must be null on success.  Messed up in
commit 3eb99edb48 "loader-fit: Wean off error_printf()".

No caller actually passes such values, or uses *errp on success.

Fix anyway: splice in a local Error *err, and error_propagate().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20191204093625.14836-8-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
2019-12-18 08:36:15 +01:00
..
2019-11-23 15:51:48 +01:00
2019-08-16 13:31:52 +02:00
2019-08-21 09:13:37 +02:00
2019-12-17 09:01:14 +01:00
2019-08-16 13:31:52 +02:00
2019-12-16 13:04:46 +01:00
2019-12-16 13:04:46 +01:00
2019-08-16 13:31:53 +02:00
2019-12-16 10:46:34 +00:00
2019-12-14 10:25:50 +01:00
2019-12-17 10:39:48 +11:00
2019-08-16 13:31:53 +02:00
2019-08-16 13:31:53 +02:00
2019-11-05 18:52:29 +01:00
2019-12-16 13:16:15 +01:00
2019-12-16 14:07:56 +00:00
2019-10-28 19:06:47 +01:00
2019-12-17 10:59:11 +11:00
2019-11-19 10:01:34 +01:00
2019-08-16 13:31:53 +02:00
2019-08-16 13:31:52 +02:00
2019-12-14 10:22:38 +01:00
2019-08-16 13:31:53 +02:00
2019-10-18 20:38:10 -07:00
2019-12-17 09:01:14 +01:00
2019-12-17 09:01:14 +01:00