Skip to content

Commit

Permalink
Fix unclosed fd reported by code scan tool
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyuhong committed Feb 19, 2019
1 parent 3a917d4 commit 5be7b89
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cpp/src/plasma/io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ int ConnectIpcSock(const std::string& pathname) {
socket_address.sun_family = AF_UNIX;
if (pathname.size() + 1 > sizeof(socket_address.sun_path)) {
ARROW_LOG(ERROR) << "Socket pathname is too long.";
close(socket_fd);
return -1;
}
strncpy(socket_address.sun_path, pathname.c_str(), pathname.size() + 1);
Expand Down

0 comments on commit 5be7b89

Please sign in to comment.