]> source.dussan.org Git - rspamd.git/commitdiff
* Fix possible memory leakage by freeing g_error resourses
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Tue, 30 Jun 2009 15:19:00 +0000 (19:19 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Tue, 30 Jun 2009 15:19:00 +0000 (19:19 +0400)
src/plugins/surbl.c

index 53e04df90e7b6c0489c60c8445e651f512d17abd..093b67d88c3e3dd178b289c5cfd46a753d41ab32 100644 (file)
@@ -393,8 +393,12 @@ make_surbl_requests (struct uri* url, struct worker_task *task, GTree *tree)
                        }
                        else if (err != NULL && err->code != WHITELIST_ERROR) {
                                msg_info ("surbl_test_url: cannot format url string for surbl %s, %s", struri (url), err->message);
+                               g_error_free (err);
                                return;
                        }
+                       else if (err != NULL) {
+                               g_error_free (err);
+                       }
                }
                else {
                        msg_debug ("make_surbl_requests: skipping symbol that is not in view: %s", suffix->symbol);