Remove the unnecessary goto error followed by goto cleanup processing. Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- src/openvz/openvz_driver.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index ec9541840a..2c62dd6f29 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -319,22 +319,18 @@ openvzDomainGetHostname(virDomainPtr dom, unsigned int flags) hostname = openvzVEGetStringParam(dom, "hostname"); if (hostname == NULL) - goto error; + goto cleanup; /* vzlist prints an unset hostname as '-' */ if (STREQ(hostname, "-")) { virReportError(VIR_ERR_OPERATION_FAILED, _("Hostname of '%s' is unset"), vm->def->name); - goto error; + VIR_FREE(hostname); } cleanup: virDomainObjEndAPI(&vm); return hostname; - - error: - VIR_FREE(hostname); - goto cleanup; } -- 2.13.6 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list