Fix: Don't dispatch uninitialized hash tables to the ht_cleanup thread
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 11 Nov 2013 20:30:08 +0000 (15:30 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 11 Nov 2013 20:44:51 +0000 (15:44 -0500)
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 <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/utils.c

index 2ff57cd1465c6071eb0d89705b061ef3dafac05f..c9c51ede5abcb2ada1ffa7253b946e1ca646467c 100644 (file)
@@ -52,6 +52,9 @@ void ht_cleanup_push(struct lttng_ht *ht)
        ssize_t ret;
        int fd = ht_cleanup_pipe[1];
 
+       if (!ht) {
+               return;
+       }
        if (fd < 0)
                return;
        ret = lttng_write(fd, &ht, sizeof(ht));
This page took 0.025862 seconds and 4 git commands to generate.