Fixed valgrind complain

This commit is contained in:
Chai Zhenhua 2013-01-06 13:47:52 +08:00
parent 86e0455724
commit fc7b3ef223
2 changed files with 5 additions and 2 deletions

View File

@ -216,6 +216,8 @@ apr_status_t ap_http_out_filter(ap_filter_t *f, apr_bucket_brigade *b) {
}
void modsecTerminate() {
apr_pool_destroy(pool);
pool = NULL;
apr_terminate();
}
@ -267,7 +269,7 @@ conn_rec *modsecNewConnection() {
apr_pool_create(&pc, pool);
c = apr_palloc(pc, sizeof(conn_rec));
c = apr_pcalloc(pc, sizeof(conn_rec));
c->base_server = server;
c->id = 1;
@ -300,7 +302,7 @@ request_rec *modsecNewRequest(conn_rec *connection, directory_config *config)
apr_pool_create(&pr, connection->pool);
r = apr_palloc(pr, sizeof(request_rec));
r = apr_pcalloc(pr, sizeof(request_rec));
r->connection = connection;
r->server = server;

View File

@ -992,6 +992,7 @@ AP_DECLARE(apr_status_t) unixd_set_proc_mutex_perms(apr_proc_mutex_t *pmutex)
#endif
union semun ick;
struct semid_ds buf;
memset(&buf,0,sizeof(buf));
apr_os_proc_mutex_get(&ospmutex, pmutex);
buf.sem_perm.uid = unixd_config.user_id;