diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-21 14:51:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-21 14:51:31 +0000 |
commit | cb8a4142d1c9c4eed1fd94225a7039e05607e48b (patch) | |
tree | 1a832199e27f373363ddfa394ac6379e46176e1f /src/libserver | |
parent | 02c2671d75dcda0a6173f3e1b408ef20a8f1b91c (diff) | |
parent | 559e6c6d2c8915f4121de09e7dfe24cd4ba4f8cf (diff) | |
download | rspamd-cb8a4142d1c9c4eed1fd94225a7039e05607e48b.tar.gz rspamd-cb8a4142d1c9c4eed1fd94225a7039e05607e48b.zip |
Merge pull request #1276 from fatalbanana/e
[Fix] Avoid reusing g_error (Fixes #1262)
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/dkim.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c index 873d59d22..00b633b18 100644 --- a/src/libserver/dkim.c +++ b/src/libserver/dkim.c @@ -1130,6 +1130,11 @@ rspamd_dkim_dns_cb (struct rdns_reply *reply, gpointer arg) LL_FOREACH (reply->entries, elt) { if (elt->type == RDNS_REQUEST_TXT) { + if (err != NULL) { + /* Free error as it is insignificant */ + g_error_free (err); + err = NULL; + } key = rspamd_dkim_parse_key (cbdata->ctx, elt->content.txt.data, &keylen, &err); @@ -1139,11 +1144,6 @@ rspamd_dkim_dns_cb (struct rdns_reply *reply, gpointer arg) } } } - if (key != NULL && err != NULL) { - /* Free error as it is insignificant */ - g_error_free (err); - err = NULL; - } cbdata->handler (key, keylen, cbdata->ctx, cbdata->ud, err); } } |