From: Jérémie Galarneau Date: Tue, 14 Jun 2016 16:29:24 +0000 (-0400) Subject: Assert that a valid clean-up pipe exists on ht_cleanup_push X-Git-Tag: v2.9.0-rc1~128 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fc41443f7ee5fa95a942d0aedd61c75d622697b5;p=lttng-tools.git Assert that a valid clean-up pipe exists on ht_cleanup_push Signed-off-by: Jérémie Galarneau --- 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);