diff --git a/src/anbox/platform/sdl/platform.cpp b/src/anbox/platform/sdl/platform.cpp index 3e061f2bbeda86d5063da924bf187a54cb3a03a9..4ac31f8c34ff9b1c38ec74ee19af5082155b9d95 100644 --- a/src/anbox/platform/sdl/platform.cpp +++ b/src/anbox/platform/sdl/platform.cpp @@ -176,6 +176,7 @@ void Platform::create_ime_socket() { socket_addr.sun_family = AF_UNIX; if (ime_socket_file_.length() >= strlen(socket_addr.sun_path) - 1) { ERROR("Create ime failed, socket path too long"); + close(ime_socket); return; } strcpy(socket_addr.sun_path, ime_socket_file_.c_str());