From fc41443f7ee5fa95a942d0aedd61c75d622697b5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 14 Jun 2016 12:29:24 -0400 Subject: [PATCH] Assert that a valid clean-up pipe exists on ht_cleanup_push MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bin/lttng-sessiond/utils.c b/src/bin/lttng-sessiond/utils.c index f77a21ddb..d67619820 100644 --- a/src/bin/lttng-sessiond/utils.c +++ b/src/bin/lttng-sessiond/utils.c @@ -55,8 +55,7 @@ void ht_cleanup_push(struct lttng_ht *ht) if (!ht) { return; } - if (fd < 0) - return; + assert(fd >= 0); ret = lttng_write(fd, &ht, sizeof(ht)); if (ret < sizeof(ht)) { PERROR("write ht cleanup pipe %d", fd); -- 2.34.1