libxlLoggerNew: virHashNew cannot return NULL

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-07-05 15:47:52 +02:00
parent 3ae0c7715e
commit ae06bc9cfe

View File

@ -149,9 +149,7 @@ libxlLoggerNew(const char *logDir, virLogPriority minLevel)
break;
}
logger.logDir = logDir;
if ((logger.files = virHashNew(libxlLoggerFileFree)) == NULL)
return NULL;
logger.files = virHashNew(libxlLoggerFileFree);
path = g_strdup_printf("%s/libxl-driver.log", logDir);