}
/* Strip ".sh" suffix from file name for comparison */
- filename_no_sh = strdupa(filename);
+ filename_no_sh = strdupa_safe(filename);
e = endswith(filename_no_sh, ".sh");
if (e) {
*e = '\0';
STRV_FOREACH(path, sysvinit_path) {
_cleanup_closedir_ DIR *d = NULL;
- struct dirent *de;
d = opendir(*path);
if (!d) {
for (unsigned i = 0; i < ELEMENTSOF(rcnd_table); i ++) {
_cleanup_closedir_ DIR *d = NULL;
_cleanup_free_ char *path = NULL;
- struct dirent *de;
path = path_join(*p, rcnd_table[i].path);
if (!path) {