mirror of
https://github.com/clearlinux/clr-debug-info.git
synced 2026-08-26 18:17:22 +00:00
Free configured urls on server exit
This commit is contained in:
committed by
Patrick McCarty
parent
aa87b16a54
commit
5babb4f44f
@@ -133,6 +133,16 @@ int configure_urls(void)
|
||||
return count;
|
||||
}
|
||||
|
||||
void free_urls(void)
|
||||
{
|
||||
if (urls != urls_default) {
|
||||
for (int i=0; i<urls_size; i++) {
|
||||
free(urls[i]);
|
||||
}
|
||||
free(urls);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_ATOMIC_SUPPORT
|
||||
|
||||
static atomic_int current_connection_count = 0;
|
||||
@@ -596,6 +606,8 @@ int main(__nc_unused__ int argc, __nc_unused__ char **argv)
|
||||
if (hash) {
|
||||
nc_hashmap_free(hash);
|
||||
}
|
||||
|
||||
free_urls();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user