X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Fdestruction-handle.c;h=f0ff0d4e170e0e4bf2178b0075e91047b3170a4e;hp=b6a70bac6803cf852933ffb87d25398498a86b57;hb=b6d816c549c67b05339722a503a8272f81022dc2;hpb=7d81aa9fff703f8fcf35f8ac426aa37d0ffffb16 diff --git a/src/lib/lttng-ctl/destruction-handle.c b/src/lib/lttng-ctl/destruction-handle.c index b6a70bac6..f0ff0d4e1 100644 --- a/src/lib/lttng-ctl/destruction-handle.c +++ b/src/lib/lttng-ctl/destruction-handle.c @@ -420,7 +420,9 @@ enum lttng_error_code lttng_destroy_session_ext(const char *session_name, error: if (sessiond_socket >= 0) { ret = close(sessiond_socket); - PERROR("Failed to close the LTTng session daemon connection socket"); + if (ret < 0) { + PERROR("Failed to close the LTTng session daemon connection socket"); + } } if (handle) { lttng_destruction_handle_destroy(handle);