aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-06-10 18:47:08 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-06-10 18:47:08 +0400
commit57c077a06e7d04d5d053a4f3565319dd9e41f442 (patch)
tree74334455b824bcda2c4f38acf0dd6eea399a4336 /src
parentd6ff0ee6444a52bba805f0746ed795d68b56fb8a (diff)
downloadrspamd-57c077a06e7d04d5d053a4f3565319dd9e41f442.tar.gz
rspamd-57c077a06e7d04d5d053a4f3565319dd9e41f442.zip
Fix memory issues.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/spf.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/spf.c b/src/plugins/spf.c
index 223bc1241..a7c48e702 100644
--- a/src/plugins/spf.c
+++ b/src/plugins/spf.c
@@ -281,6 +281,11 @@ spf_record_copy (GList *addrs)
/* Recursive call */
newa->data.list = spf_record_copy (addr->data.list);
}
+ else {
+ if (addr->spf_string) {
+ newa->spf_string = g_strdup (addr->spf_string);
+ }
+ }
newl = g_list_prepend (newl, newa);
cur = g_list_next (cur);
}
@@ -305,8 +310,11 @@ spf_record_destroy (gpointer list)
spf_record_destroy (addr->data.list);
}
else {
- g_free (addr);
+ if (addr->spf_string) {
+ g_free (addr->spf_string);
+ }
}
+ g_free (addr);
cur = g_list_next (cur);
}