As of commit
b2d079c113a which converted this function to use g_strdup,
the error label is only reached when i = 0, rendering it useless.
Remove it.
Fixes: https://gitlab.com/libvirt/libvirt/-/issues/572
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
int maxerrors)
{
size_t i = 0;
- size_t j;
if (ret_errors_len > limit || ret_errors_len > maxerrors) {
virReportError(VIR_ERR_RPC, "%s",
_("returned number of disk errors exceeds limit"));
- goto error;
+ return -1;
}
for (i = 0; i < ret_errors_len; i++) {
}
return 0;
-
- error:
- for (j = 0; j < i; j++)
- VIR_FREE(errors[j].disk);
-
- return -1;
}
static int