Skip to content

Commit

Permalink
Don't try and free local thread instance data if it's not been allocated
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed May 13, 2024
1 parent f27ce3d commit c323250
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/server/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c323250

Please sign in to comment.