diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-25 16:00:58 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-25 16:00:58 +0000 |
commit | 02061addefac8309269a2e7c9f2e588097ed06e7 (patch) | |
tree | e3c7fd5c6888cff2b5a588bc8cca771059c0917b /src/libserver/rspamd_control.c | |
parent | b7eec7adcde6199158f87d171a751ad59a6b4b0b (diff) | |
download | rspamd-02061addefac8309269a2e7c9f2e588097ed06e7.tar.gz rspamd-02061addefac8309269a2e7c9f2e588097ed06e7.zip |
Use the correct key to fix memory issues
Diffstat (limited to 'src/libserver/rspamd_control.c')
-rw-r--r-- | src/libserver/rspamd_control.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libserver/rspamd_control.c b/src/libserver/rspamd_control.c index 10d853e9d..7eac7104a 100644 --- a/src/libserver/rspamd_control.c +++ b/src/libserver/rspamd_control.c @@ -541,8 +541,7 @@ rspamd_srv_handler (gint fd, short what, gpointer ud) nid = g_malloc (sizeof (cmd.cmd.spair.pair_id)); memcpy (nid, cmd.cmd.spair.pair_id, sizeof (cmd.cmd.spair.pair_id)); - g_hash_table_insert (srv->spairs, - cmd.cmd.spair.pair_id, spair); + g_hash_table_insert (srv->spairs, nid, spair); rdata->rep.reply.spair.code = 0; rdata->fd = cmd.cmd.spair.pair_num ? spair[1] : spair[0]; } |