[Groonga-commit] groonga/groonga at 8d55456 [master] groonga-httpd: free logger user data explicitly

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Aug 20 18:53:21 JST 2013


Kouhei Sutou	2013-08-20 18:53:21 +0900 (Tue, 20 Aug 2013)

  New Revision: 8d5545602a6a79f1c0956af789b019eb83e57583
  https://github.com/groonga/groonga/commit/8d5545602a6a79f1c0956af789b019eb83e57583

  Message:
    groonga-httpd: free logger user data explicitly

  Modified files:
    src/httpd/nginx-module/ngx_http_groonga_module.c

  Modified: src/httpd/nginx-module/ngx_http_groonga_module.c (+5 -0)
===================================================================
--- src/httpd/nginx-module/ngx_http_groonga_module.c    2013-08-20 18:50:07 +0900 (e0259be)
+++ src/httpd/nginx-module/ngx_http_groonga_module.c    2013-08-20 18:53:21 +0900 (085aad6)
@@ -58,6 +58,7 @@ typedef struct {
 } ngx_http_groonga_handler_data_t;
 
 typedef struct {
+  ngx_pool_t *pool;
   ngx_open_file_t *file;
 } ngx_http_groonga_logger_data_t;
 
@@ -126,6 +127,9 @@ ngx_http_groonga_logger_reopen(grn_ctx *ctx, void *user_data)
 static void
 ngx_http_groonga_logger_fin(grn_ctx *ctx, void *user_data)
 {
+  ngx_http_groonga_logger_data_t *logger_data = user_data;
+
+  ngx_pfree(logger_data->pool, logger_data);
 }
 
 static grn_logger ngx_http_groonga_logger = {
@@ -158,6 +162,7 @@ ngx_http_groonga_context_init(grn_ctx *context,
     return NGX_OK;
   }
 
+  logger_data->pool = pool;
   logger_data->file = location_conf->log_file;
   ngx_http_groonga_logger.max_level = location_conf->log_level;
   ngx_http_groonga_logger.user_data = logger_data;
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index