Fix calls to {m,c,re}alloc so that they use x{m,c,re}alloc instead of
[oweals/busybox.git] / syslogd.c
index dfc933dbf36ee051c7536118a10f64baa1395712..8648da271b53b312380cf1ccc7a942da5d47d38f 100644 (file)
--- a/syslogd.c
+++ b/syslogd.c
@@ -308,7 +308,7 @@ static void doSyslogd (void)
        /* Create the syslog file so realpath() can work. */
        close (open (_PATH_LOG, O_RDWR | O_CREAT, 0644));
        if (realpath (_PATH_LOG, lfile) == NULL)
-               fatalError ("Could not resolv path to " _PATH_LOG ": %s\n", strerror (errno));
+               fatalError ("Could not resolve path to " _PATH_LOG ": %s\n", strerror (errno));
 
        unlink (lfile);
 
@@ -371,8 +371,11 @@ static void doSyslogd (void)
                                                continue;
                                        }
 
-                                       if (pid == 0)
+                                       if (pid == 0) {
                                                serveConnection (conn);
+                                               close (conn);
+                                               exit( TRUE);
+                                       }
                                        close (conn);
                                }
                        }