From f6252cf6b0b3d4551b5a885fb772487b7b1df70e Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Mon, 5 Jul 2021 16:53:01 +0200 Subject: [PATCH] virDomainCCWAddressSetCreate: `virHashNew` cannot return NULL Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/domain_addr.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index f011721beb..53b39923e8 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -1388,8 +1388,7 @@ virDomainCCWAddressSetCreate(void) addrs = g_new0(virDomainCCWAddressSet, 1); - if (!(addrs->defined = virHashNew(g_free))) - goto error; + addrs->defined = virHashNew(g_free); /* must use cssid = 0xfe (254) for virtio-ccw devices */ addrs->next.cssid = 254; @@ -1397,10 +1396,6 @@ virDomainCCWAddressSetCreate(void) addrs->next.devno = 0; addrs->next.assigned = 0; return addrs; - - error: - virDomainCCWAddressSetFree(addrs); - return NULL; }