Cleanup: Reduce scope of connections in main relayd thread
[lttng-tools.git] / src / bin / lttng-sessiond / ust-registry.c
index dc494161cd60ebedd6b55f19fd402458ca9b9fe7..1a00e9349fb2f04c6052a5222acaf7d927fdd471 100644 (file)
@@ -15,6 +15,7 @@
  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <assert.h>
 #include <inttypes.h>
 
@@ -607,7 +608,9 @@ void ust_registry_session_destroy(struct ust_registry_session *reg)
        struct lttng_ht_iter iter;
        struct ust_registry_channel *chan;
 
-       assert(reg);
+       if (!reg) {
+               return;
+       }
 
        /* On error, EBUSY can be returned if lock. Code flow error. */
        ret = pthread_mutex_destroy(&reg->lock);
This page took 0.02388 seconds and 4 git commands to generate.