From cb7260c7d88e586dd941ea2e4a4c48c3efde61b4 Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Mon, 5 Jul 2021 16:51:35 +0200 Subject: [PATCH] virChrdevAlloc: `virHashNew` cannot return NULL Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virchrdev.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c index 91f2b5a233..5d6de68427 100644 --- a/src/conf/virchrdev.c +++ b/src/conf/virchrdev.c @@ -265,13 +265,9 @@ virChrdevs *virChrdevAlloc(void) /* there will hardly be any devices most of the time, the hash * does not have to be huge */ - if (!(devs->hash = virHashNew(virChrdevHashEntryFree))) - goto error; + devs->hash = virHashNew(virChrdevHashEntryFree); return devs; - error: - virChrdevFree(devs); - return NULL; } /**