diff --git a/services/init/init_service_socket.c b/services/init/init_service_socket.c index f001f91c5c3e842deac5c07828417fe74fd553cf..a7b70ba1d5ebb9c45e7b853d4e3a07eaeefba66b 100755 --- a/services/init/init_service_socket.c +++ b/services/init/init_service_socket.c @@ -202,6 +202,7 @@ void SocketDelWatcher(ServiceWatcher watcherHandle) int CreateServiceSocket(Service *service) { INIT_CHECK(service != NULL && service->socketCfg != NULL, return 0); + INIT_CHECK(service->socketCfg->sockFd == -1, return 0); int ret = 0; ServiceSocket *tmpSock = service->socketCfg; while (tmpSock != NULL) { diff --git a/services/init/standard/init.c b/services/init/standard/init.c index 750f354260621fa5de721c74e23c8a9d1542e4a1..f4acf26bd60c8d5e8ec5870bbbda42f8c83f3feb 100755 --- a/services/init/standard/init.c +++ b/services/init/standard/init.c @@ -158,6 +158,7 @@ static int StartUeventd(char **requiredDevices, int num) return -1; } RetriggerUevent(ueventSockFd, requiredDevices, num); + close(ueventSockFd); return 0; }