Now that new_server() is becoming more and more complex, we need to
take care that servers created using new_server() must be released
using the corresponding release function srv_drop() which takes care
of properly de-initing the server and its members.
error:
- list_for_each_entry(child, &proc_list, list) {
- free((char *)child->srv->conf.file); /* cast because of const char * */
- free(child->srv->id);
- srv_free(&child->srv);
- }
+ list_for_each_entry(child, &proc_list, list)
+ srv_drop(child->srv);
free(msg);
return -1;
free_check(&newsrv->check);
MT_LIST_DELETE(&newsrv->global_list);
}
- srv_free(&newsrv);
+ srv_drop(newsrv);
return i - srv->tmpl_info.nb_low;
}