commit 4794767: [Fix] Do not forget to clear pointers on IOC reset

Vsevolod Stakhov vsevolod at highsecure.ru
Sat Jan 29 12:49:04 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-01-29 12:46:18 +0000
URL: https://github.com/rspamd/rspamd/commit/47947673589848dc2dfda3c62a9977808c37235b (HEAD -> master)

[Fix] Do not forget to clear pointers on IOC reset

---
 contrib/librdns/util.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/librdns/util.c b/contrib/librdns/util.c
index f4c442563..900791b14 100644
--- a/contrib/librdns/util.c
+++ b/contrib/librdns/util.c
@@ -694,6 +694,7 @@ rdns_ioc_tcp_reset (struct rdns_io_channel *ioc)
 			ioc->tcp->read_buf_allocated = 0;
 			ioc->tcp->next_read_size = 0;
 			ioc->tcp->cur_read = 0;
+			ioc->tcp->cur_read_buf = NULL;
 		}
 
 		struct rdns_tcp_output_chain *oc, *tmp;
@@ -703,6 +704,7 @@ rdns_ioc_tcp_reset (struct rdns_io_channel *ioc)
 		}
 
 		ioc->tcp->cur_output_chains = 0;
+		ioc->tcp->output_chain = NULL;
 
 		ioc->flags &= ~RDNS_CHANNEL_CONNECTED;
 	}


More information about the Commits mailing list