Check NULL from abspath()

abspath() returns NULL in some cases and its return value is always checked for NULL.
This commit is contained in:
Peter Zmanovsky 2024-12-19 12:26:32 +05:00
parent ef6e00c85c
commit a23861332a

View file

@ -8759,6 +8759,11 @@ int main(int argc, char *argv[])
close(fd);
selpath = abspath(optarg, NULL, NULL);
if (!selpath) {
xerror();
return EXIT_FAILURE;
}
unlink(selpath);
}
break;