Skip to content

Commit

Permalink
nats: safety check on nats_workers inside mod destroy
Browse files Browse the repository at this point in the history
(cherry picked from commit bc97b7a)
  • Loading branch information
miconda committed Jan 6, 2023
1 parent 0ead354 commit ace6ec1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/nats/nats_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,9 @@ int nats_destroy_workers()
*/
static void mod_destroy(void)
{
if(nats_workers==NULL) {
return;
}
if(nats_destroy_workers() < 0) {
LM_ERR("could not cleanup workers\n");
}
Expand Down

0 comments on commit ace6ec1

Please sign in to comment.