mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
conf_reload(): Exit properly, even if no /etc/finit.d/*.conf exitsts
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
e4c12314b1
commit
f3305e75b7
1 file changed
+2
-1
+2
-1
@@ -516,7 +516,7 @@ int conf_reload(void)
|
|||||||
num = scandir(rcsd, &e, NULL, alphasort);
|
num = scandir(rcsd, &e, NULL, alphasort);
|
||||||
if (num < 0) {
|
if (num < 0) {
|
||||||
_d("Skipping %s, no files found ...", rcsd);
|
_d("Skipping %s, no files found ...", rcsd);
|
||||||
return 0;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < num; i++) {
|
for (i = 0; i < num; i++) {
|
||||||
@@ -566,6 +566,7 @@ int conf_reload(void)
|
|||||||
free(e[num]);
|
free(e[num]);
|
||||||
free(e);
|
free(e);
|
||||||
|
|
||||||
|
done:
|
||||||
/* Drop record of all .conf changes */
|
/* Drop record of all .conf changes */
|
||||||
drop_changes();
|
drop_changes();
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user