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 <asavkov@redhat.com>
This commit is contained in:
Artem Savkov 2019-07-31 14:53:54 +02:00
parent 79728dddaf
commit 9c1aa2d492
1 changed files with 1 additions and 1 deletions

View File

@ -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') {