Fix small memory leak, use whichp() to query, not which()
@@ -553,7 +553,7 @@ int main(int argc, char *argv[])
/*
* 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);
wdog = svc_find_by_nameid("watchdog", "finit");
}
