]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't try and free local thread instance data if it's not been allocated
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 13 May 2024 23:17:31 +0000 (17:17 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 13 May 2024 23:17:31 +0000 (17:17 -0600)
src/lib/server/module.c

index d6fd6d4c860883559a37eb23f46a6c0c7a4e036b..c073e78b106365f521159623a7f045349c73550d 100644 (file)
@@ -528,7 +528,11 @@ typedef struct {
 static void mltl_mlg_data_del(module_instance_t *mi)
 {
        mltl_module_instance_t *mltl_mi = (mltl_module_instance_t *)talloc_get_type_abort(mi, module_instance_t);
-       module_thread_detach(mltl_mi->ti);
+
+       /*
+        *      Only free thread instance data we allocated...
+        */
+       if (mltl_mi->ti) module_thread_detach(mltl_mi->ti);
 }
 
 static module_thread_instance_t *mltl_thread_data_get(module_instance_t *mi)