Richard Henderson 53645dc4cb util/selfmap: Discard mapping on error
From clang-13:
util/selfmap.c:26:21: error: variable 'errors' set but not used \
    [-Werror,-Wunused-but-set-variable]

Quite right of course, but there's no reason not to check errors.

First, incrementing errors is incorrect, because qemu_strtoul
returns an errno not a count -- just or them together so that
we have a non-zero value at the end.

Second, if we have an error, do not add the struct to the list,
but free it instead.

Cc: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2021-07-26 07:06:49 -10:00
..
2021-07-21 13:47:50 +01:00
2021-07-06 08:33:51 +02:00
2021-07-09 18:20:27 +02:00
2021-06-13 17:42:40 -07:00
2021-07-09 18:42:46 +02:00
2021-07-09 18:20:27 +02:00
2021-04-30 12:27:47 +02:00