From mboxrd@z Thu Jan 1 00:00:00 1970 From: jeremie.galarneau@efficios.com (=?UTF-8?q?J=C3=A9r=C3=A9mie=20Galarneau?=) Date: Mon, 11 Nov 2013 14:43:16 -0500 Subject: [lttng-dev] [PATCH lttng-tools] Fix: Don't dispatch uninitialized hash tables to the ht_cleanup thread Message-ID: <1384198996-29028-1-git-send-email-jeremie.galarneau@efficios.com> Some error-handling code paths may call ht_cleanup_push() with NULL hash tables which will crash the clean-up thread. Signed-off-by: J?r?mie Galarneau --- src/bin/lttng-sessiond/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/lttng-sessiond/utils.c b/src/bin/lttng-sessiond/utils.c index 85a1f02..5efa1d4 100644 --- a/src/bin/lttng-sessiond/utils.c +++ b/src/bin/lttng-sessiond/utils.c @@ -54,6 +54,9 @@ void ht_cleanup_push(struct lttng_ht *ht) int ret; int fd = ht_cleanup_pipe[1]; + if (!ht) { + return; + } if (fd < 0) return; do { -- 1.8.4.2