eliminate the need for a worker_pool variable in main_server_st.

This commit is contained in:
Nikos Mavrogiannopoulos
2014-05-12 10:51:18 +02:00
parent 1465a5922c
commit 5e3afb92ad
2 changed files with 5 additions and 8 deletions

View File

@@ -786,7 +786,6 @@ unsigned total = 10;
clear_lists(s);
tls_global_deinit(s->creds);
clear_cfg_file(&s->config);
talloc_free(s->worker_pool);
talloc_free(s->main_pool);
closelog();
exit(0);
@@ -845,15 +844,15 @@ int main(int argc, char** argv)
memset(&creds, 0, sizeof(creds));
worker_pool = talloc_init("worker");
if (worker_pool == NULL) {
/* main pool */
main_pool = talloc_init("main");
if (main_pool == NULL) {
fprintf(stderr, "talloc init error\n");
exit(1);
}
/* main pool */
main_pool = talloc_init("main");
if (main_pool == NULL) {
worker_pool = talloc_named(main_pool, 0, "worker", NULL);
if (worker_pool == NULL) {
fprintf(stderr, "talloc init error\n");
exit(1);
}
@@ -870,7 +869,6 @@ int main(int argc, char** argv)
exit(1);
}
s->main_pool = main_pool;
s->worker_pool = worker_pool;
s->creds = &creds;
s->start_time = time(0);

View File

@@ -190,7 +190,6 @@ typedef struct main_server_st {
int ctl_fd;
#endif
void *main_pool; /* talloc main pool */
void *worker_pool; /* talloc worker pool */
} main_server_st;
void clear_lists(main_server_st *s);