summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys-utils/lscpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index 5ff5aa79d..7cdc9f927 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -565,8 +565,8 @@ read_hypervisor(struct lscpu_desc *desc)
str = strchr(buf, ':');
if (!str)
continue;
- if (xasprintf(&str, "%s", str + 1) == -1)
- errx(EXIT_FAILURE, _("failed to allocate memory"));
+ xasprintf(&str, "%s", str + 1);
+
/* remove leading, trailing and repeating whitespace */
while (*str == ' ')
str++;