ircd: various memory leak fixes from pull requests
This commit is contained in:
parent
87c44482d0
commit
55d5f7970a
6 changed files with 10 additions and 7 deletions
|
@ -451,7 +451,7 @@ void irc_dictionary_destroy(struct Dictionary *dtree,
|
||||||
}
|
}
|
||||||
|
|
||||||
rb_dlinkDelete(&dtree->node, &dictionary_list);
|
rb_dlinkDelete(&dtree->node, &dictionary_list);
|
||||||
|
rb_free(dtree->id);
|
||||||
rb_free(dtree);
|
rb_free(dtree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -218,6 +218,8 @@ irc_radixtree_destroy(struct irc_radixtree *dtree, void (*destroy_cb)(const char
|
||||||
irc_radixtree_delete(dtree, delem->leaf.key);
|
irc_radixtree_delete(dtree, delem->leaf.key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rb_dlinkDelete(&dtree->node, &radixtree_list);
|
||||||
|
rb_free(dtree->id);
|
||||||
rb_free(dtree);
|
rb_free(dtree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -707,6 +707,7 @@ unload_one_module(const char *name, int warn)
|
||||||
lt_dlclose(modlist[modindex]->address);
|
lt_dlclose(modlist[modindex]->address);
|
||||||
|
|
||||||
rb_free(modlist[modindex]->name);
|
rb_free(modlist[modindex]->name);
|
||||||
|
rb_free(modlist[modindex]);
|
||||||
memmove(&modlist[modindex], &modlist[modindex + 1],
|
memmove(&modlist[modindex], &modlist[modindex + 1],
|
||||||
sizeof(struct module *) * ((num_mods - 1) - modindex));
|
sizeof(struct module *) * ((num_mods - 1) - modindex));
|
||||||
|
|
||||||
|
|
|
@ -864,8 +864,8 @@ conf_set_listen_port_both(void *data, int ssl)
|
||||||
{
|
{
|
||||||
if (!ssl)
|
if (!ssl)
|
||||||
{
|
{
|
||||||
conf_report_error("listener '%s/%d': support for plaintext listeners is being deprecated and may be removed in a future release. "
|
conf_report_error("listener 'ANY/%d': support for plaintext listeners is being deprecated and may be removed in a future release. "
|
||||||
"It is suggested that users be migrated to SSL/TLS connections.", listener_address, args->v.number);
|
"It is suggested that users be migrated to SSL/TLS connections.", args->v.number);
|
||||||
}
|
}
|
||||||
add_listener(args->v.number, listener_address, AF_INET, ssl, ssl || yy_defer_accept);
|
add_listener(args->v.number, listener_address, AF_INET, ssl, ssl || yy_defer_accept);
|
||||||
#ifdef RB_IPV6
|
#ifdef RB_IPV6
|
||||||
|
@ -884,8 +884,8 @@ conf_set_listen_port_both(void *data, int ssl)
|
||||||
|
|
||||||
if (!ssl)
|
if (!ssl)
|
||||||
{
|
{
|
||||||
conf_report_error("listener 'ANY/%d': support for plaintext listeners is being deprecated and may be removed in a future release. "
|
conf_report_error("listener '%s/%d': support for plaintext listeners is being deprecated and may be removed in a future release. "
|
||||||
"It is suggested that users be migrated to SSL/TLS connections.", args->v.number);
|
"It is suggested that users be migrated to SSL/TLS connections.", listener_address, args->v.number);
|
||||||
}
|
}
|
||||||
|
|
||||||
add_listener(args->v.number, listener_address, family, ssl, ssl || yy_defer_accept);
|
add_listener(args->v.number, listener_address, family, ssl, ssl || yy_defer_accept);
|
||||||
|
|
|
@ -83,7 +83,7 @@ void substitution_free(rb_dlink_list *varlist)
|
||||||
{
|
{
|
||||||
struct substitution_variable *tmp = (struct substitution_variable *) nptr->data;
|
struct substitution_variable *tmp = (struct substitution_variable *) nptr->data;
|
||||||
|
|
||||||
rb_dlinkDelete(nptr, varlist);
|
rb_dlinkDestroy(nptr, varlist);
|
||||||
rb_free(tmp->name);
|
rb_free(tmp->name);
|
||||||
rb_free(tmp->value);
|
rb_free(tmp->value);
|
||||||
rb_free(tmp);
|
rb_free(tmp);
|
||||||
|
|
|
@ -449,7 +449,7 @@ rb_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
|
||||||
s = va_arg(args, char *);
|
s = va_arg(args, char *);
|
||||||
if(s == NULL)
|
if(s == NULL)
|
||||||
{
|
{
|
||||||
abort(); /* prefer blowing up vs corrupt data */
|
s = "(null)";
|
||||||
}
|
}
|
||||||
len = rb_strnlen(s, precision);
|
len = rb_strnlen(s, precision);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue