Remove the pointless variable and pointer stealing. Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- src/conf/domain_addr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index ab508b0c8f..03d0c6825d 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -2029,7 +2029,7 @@ virDomainUSBAddressControllerModelToPorts(virDomainControllerDefPtr cont) static virDomainUSBAddressHubPtr virDomainUSBAddressHubNew(size_t nports) { - virDomainUSBAddressHubPtr hub = NULL, ret = NULL; + virDomainUSBAddressHubPtr hub; hub = g_new0(virDomainUSBAddressHub, 1); @@ -2038,9 +2038,7 @@ virDomainUSBAddressHubNew(size_t nports) hub->ports = g_new0(virDomainUSBAddressHubPtr, nports); hub->nports = nports; - ret = g_steal_pointer(&hub); - virDomainUSBAddressHubFree(hub); - return ret; + return hub; } -- 2.26.2