[libvirt PATCH 20/38] virDomainDefValidateAliases: `virHashNew` cannot return NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 src/conf/domain_validate.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
index df2ab47361..aab377fbbd 100644
--- a/src/conf/domain_validate.c
+++ b/src/conf/domain_validate.c
@@ -1261,8 +1261,7 @@ virDomainDefValidateAliases(const virDomainDef *def,
     int ret = -1;
 
     /* We are not storing copies of aliases. Don't free them. */
-    if (!(data.aliases = virHashNew(NULL)))
-        goto cleanup;
+    data.aliases = virHashNew(NULL);
 
     if (virDomainDeviceInfoIterateFlags((virDomainDef *) def,
                                         virDomainDeviceDefValidateAliasesIterator,
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux