Skip to content

Commit

Permalink
Do not crash if script locks were not initialized ( eg - OpenSIPS fai…
Browse files Browse the repository at this point in the history
…led to start )

(cherry picked from commit b7bd5b5)
  • Loading branch information
vladpaiu committed Jul 29, 2014
1 parent 86c54cc commit 80793b7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/cfgutils/script_locks.c
Expand Up @@ -179,11 +179,13 @@ void destroy_script_locks(void)
lock_entry = static_locks;
static_locks = static_locks->next;

lock_dealloc(lock_entry->lock);
if (lock_entry->lock)
lock_dealloc(lock_entry->lock);
shm_free(lock_entry);
}

/* Free all dynamic locks */
lock_set_dealloc(dynamic_locks);
if (dynamic_locks)
lock_set_dealloc(dynamic_locks);
}

0 comments on commit 80793b7

Please sign in to comment.