]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
No socket filename is a startup error
authorAlan T. DeKok <aland@freeradius.org>
Sun, 17 Feb 2013 22:43:05 +0000 (17:43 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 17 Feb 2013 22:43:05 +0000 (17:43 -0500)
src/main/command.c

index 5aae86b438d820f6a3177aebeca0bec56dcebf97..4667c29dfe11f7d9f2a8b65c2c598d532b9fe6bb 100644 (file)
@@ -1888,8 +1888,12 @@ static int command_socket_parse(CONF_SECTION *cs, rad_listen_t *this)
                return -1;
        }
 
-       sock->copy = NULL;
-       if (sock->path) sock->copy = strdup(sock->path);
+       if (!sock->path) {
+               radlog(L_ERR, "Socket name is requird");
+               return -1;
+       }
+
+       sock->copy = strdup(sock->path);
 
 #if defined(HAVE_GETPEEREID) || defined (SO_PEERCRED)
        if (sock->uid_name) {