From 9c1aa2d492faeed2f0bb2ed6df506cd25777616e Mon Sep 17 00:00:00 2001 From: Artem Savkov Date: Wed, 31 Jul 2019 14:53:54 +0200 Subject: [PATCH] lookup: exit on error in make_modname() Actually exit on strdup error instead of just printing a warning message in make_modname(). Found by covscan, see issue #984 for full log. Signed-off-by: Artem Savkov --- kpatch-build/lookup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kpatch-build/lookup.c b/kpatch-build/lookup.c index 347064f..a5c5795 100644 --- a/kpatch-build/lookup.c +++ b/kpatch-build/lookup.c @@ -185,7 +185,7 @@ static char *make_modname(char *modname) name = strdup(basename(modname)); if (!name) - perror("strdup"); + ERROR("strdup"); cur = name; /* use cur as tmp */ while (*cur != '\0') {