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@xxxxxxxxxx> --- src/remote/remote_driver.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 132d0194c6..392377deae 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -1641,12 +1641,11 @@ remoteDeserializeDomainDiskErrors(remote_domain_disk_error *ret_errors_val, 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++) { @@ -1655,12 +1654,6 @@ remoteDeserializeDomainDiskErrors(remote_domain_disk_error *ret_errors_val, } return 0; - - error: - for (j = 0; j < i; j++) - VIR_FREE(errors[j].disk); - - return -1; } static int -- 2.42.0 _______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx