Fix: define _LGPL_SOURCE in C files
[lttng-tools.git] / src / bin / lttng-sessiond / utils.c
index 2ff57cd1465c6071eb0d89705b061ef3dafac05f..fef31803f181b9c5aaebeec9b9e6dd025d30247f 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <stdlib.h>
 #include <unistd.h>
 
@@ -52,6 +53,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.02443 seconds and 5 git commands to generate.