diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-09-16 16:16:50 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-09-16 16:16:50 +0400 |
commit | d23251114422696cd455ca0bc32b410357b9e571 (patch) | |
tree | cfd4a4b6e7c260b63d4f2915be01e86c833b9232 /src | |
parent | b56ea3dcdf09355681bd824c290a6373aee0180a (diff) | |
download | rspamd-d23251114422696cd455ca0bc32b410357b9e571.tar.gz rspamd-d23251114422696cd455ca0bc32b410357b9e571.zip |
* Fix double free of memory
* Fix symbols output
Diffstat (limited to 'src')
-rw-r--r-- | src/lua/lua_task.c | 3 | ||||
-rw-r--r-- | src/protocol.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 844229f9d..082b1690f 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -122,9 +122,6 @@ lua_task_insert_result (lua_State *L) } insert_result (task, metric_name, symbol_name, flag, params); - if (params != NULL) { - memory_pool_add_destructor (task->task_pool, (pool_destruct_func)g_list_free, params); - } } return 1; } diff --git a/src/protocol.c b/src/protocol.c index cd5f32424..d6fe07cca 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -454,7 +454,9 @@ metric_symbols_callback (gpointer key, gpointer value, void *user_data) outbuf[OUTBUFSIZ - 1] = '\n'; } } - r = snprintf (outbuf, OUTBUFSIZ, "Symbol: %s" CRLF, (char *)key); + else { + r = snprintf (outbuf, OUTBUFSIZ, "Symbol: %s" CRLF, (char *)key); + } cd->log_offset += snprintf (cd->log_buf + cd->log_offset, cd->log_size - cd->log_offset, "%s,", (char *)key); |