Don't unlink socket if we can't open it
authorAlan T. DeKok <aland@freeradius.org>
Mon, 14 Sep 2015 15:48:10 +0000 (11:48 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 14 Sep 2015 15:50:03 +0000 (11:50 -0400)
src/main/command.c

index f2b54cc..8242e41 100644 (file)
@@ -2720,6 +2720,8 @@ static int command_socket_parse_unix(CONF_SECTION *cs, rad_listen_t *this)
 
        if (this->fd < 0) {
                ERROR("Failed creating control socket \"%s\": %s", sock->path, fr_strerror());
+               if (sock->copy) talloc_free(sock->copy);
+               sock->copy = NULL;
                return -1;
        }