X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Funix.c;h=48fa1049ac99e6d597e8982bceb5e4cfcf9236fe;hb=feb0f3e5900ff58202ea0c3f227de3c1b8291952;hp=fea56e8efa19a404bc1170627ef5300101a39f4a;hpb=90e535ef0d0433d31e805775f85e4d187b1cf82c;p=lttng-tools.git diff --git a/src/common/sessiond-comm/unix.c b/src/common/sessiond-comm/unix.c index fea56e8ef..48fa1049a 100644 --- a/src/common/sessiond-comm/unix.c +++ b/src/common/sessiond-comm/unix.c @@ -125,6 +125,11 @@ int lttcomm_create_unix_sock(const char *pathname) return fd; error: + if (fd >= 0) { + if (close(fd) < 0) { + PERROR("close create unix sock"); + } + } return ret; }