commit c555e9e: [Minor] Remove redundant strdup

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Jan 7 15:56:06 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-01-07 11:04:08 +0000
URL: https://github.com/rspamd/rspamd/commit/c555e9e3709a76c46dc1c58eb823f17c9c7b7dc5

[Minor] Remove redundant strdup

---
 src/libserver/dns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libserver/dns.c b/src/libserver/dns.c
index 03bb88b84..c23390a47 100644
--- a/src/libserver/dns.c
+++ b/src/libserver/dns.c
@@ -779,7 +779,7 @@ rspamd_dns_read_hosts_file (struct rspamd_config *cfg,
 				rep->next = NULL;
 				rep->prev = rep;
 				rdns_resolver_set_fake_reply (dns_resolver->r,
-						g_strdup (*cur_name), rep->type, RDNS_RC_NOERROR, rep);
+						*cur_name, rep->type, RDNS_RC_NOERROR, rep);
 				msg_debug_config ("added fake record %s -> %s from hosts file %s",
 						*cur_name, rspamd_inet_address_to_string (addr), fname);
 				cur_name ++;


More information about the Commits mailing list