diff --git a/include/util/command.hpp b/include/util/command.hpp index eff9581..fe0543d 100644 --- a/include/util/command.hpp +++ b/include/util/command.hpp @@ -82,6 +82,8 @@ inline FILE* open(const std::string& cmd, int& pid) { if (child_pid < 0) { spdlog::error("Unable to exec cmd {}, error {}", cmd.c_str(), strerror(errno)); + ::close(fd[0]); + ::close(fd[1]); return nullptr; }