X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=9e4bab468f1462308f6c5377a049847015824e1b;hp=17ef7f71c318b60990f36ebe6ea2b6bde326e647;hb=34a2494f54d3dd06aa5ef49785cdd8606c404217;hpb=76d7553fcee76da7c103c3b51a6b01f46cd784c8 diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 17ef7f71c..9e4bab468 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -1431,6 +1431,7 @@ static void *thread_registration_apps(void *data) } ust_cmd->sock = sock; + sock = -1; DBG("UST registration received with pid:%d ppid:%d uid:%d" " gid:%d sock:%d name:%s (version %d.%d)", @@ -1465,7 +1466,7 @@ error: PERROR("close"); } } - if (clock >= 0) { + if (sock >= 0) { ret = close(sock); if (ret) { PERROR("close");