Fix small memory leak, use whichp() to query, not which()

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2021-04-25 19:47:15 +02:00
1 parent aef10fb5e7
commit fe334135ce
1 file changed
+1 -1
+1 -1
View File
@@ -553,7 +553,7 @@ int main(int argc, char *argv[])
/* /*
* Start built-in watchdogd as soon as possible, if enabled * Start built-in watchdogd as soon as possible, if enabled
*/ */
if (which(FINIT_LIBPATH_ "/watchdogd") && fexist(WDT_DEVNODE)) { if (whichp(FINIT_LIBPATH_ "/watchdogd") && fexist(WDT_DEVNODE)) {
service_register(SVC_TYPE_SERVICE, "[123456789] name:watchdog :finit " FINIT_LIBPATH_ "/watchdogd -- Finit watchdog daemon", global_rlimit, NULL); service_register(SVC_TYPE_SERVICE, "[123456789] name:watchdog :finit " FINIT_LIBPATH_ "/watchdogd -- Finit watchdog daemon", global_rlimit, NULL);
wdog = svc_find_by_nameid("watchdog", "finit"); wdog = svc_find_by_nameid("watchdog", "finit");
} }