summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-02 14:07:14 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-02 14:07:14 +0100
commit98e36e00c8a85ebf69b43043a10aaafb34186e27 (patch)
treec5a7af789e11ff142f072ca8e5ca1b1f24234c82 /src
parente814cc1b008814e1ced528bd17ddb6512c1a53bc (diff)
downloadrspamd-98e36e00c8a85ebf69b43043a10aaafb34186e27.tar.gz
rspamd-98e36e00c8a85ebf69b43043a10aaafb34186e27.zip
[Minor] Fix misused variable
Diffstat (limited to 'src')
-rw-r--r--src/libserver/spf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libserver/spf.c b/src/libserver/spf.c
index bee7f68d6..9af1dd112 100644
--- a/src/libserver/spf.c
+++ b/src/libserver/spf.c
@@ -790,6 +790,7 @@ spf_process_txt_record (struct spf_record *rec, struct spf_resolved_element *res
if (strncmp(elt->content.txt.data, "v=spf1", sizeof("v=spf1") - 1)
== 0) {
selected = elt;
+
if (pselected != NULL) {
*pselected = selected;
}
@@ -809,7 +810,7 @@ spf_process_txt_record (struct spf_record *rec, struct spf_resolved_element *res
if (start_spf_parse(rec, resolved, elt->content.txt.data)) {
ret = TRUE;
if (pselected != NULL) {
- *pselected = selected;
+ *pselected = elt;
}
break;
}