]> source.dussan.org Git - rspamd.git/commitdiff
Fix coredump in a client (double free).
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 12 May 2015 13:55:31 +0000 (14:55 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 12 May 2015 13:55:31 +0000 (14:55 +0100)
src/client/rspamdclient.c

index ce096f7c09baa49e396b2047abce9acdc5456aad..3632792397361d91b43ceacb8ea16f42b3076d99 100644 (file)
@@ -113,7 +113,7 @@ rspamd_client_finish_handler (struct rspamd_http_connection *conn,
                                        msg->status ? msg->status->str : "unknown error");
                        req->cb (c, msg, c->server_name->str, NULL, req->ud, err);
                        g_error_free (err);
-                       return -1;
+                       return 0;
                }
 
                parser = ucl_parser_new (0);
@@ -123,7 +123,7 @@ rspamd_client_finish_handler (struct rspamd_http_connection *conn,
                        ucl_parser_free (parser);
                        req->cb (c, msg, c->server_name->str, NULL, req->ud, err);
                        g_error_free (err);
-                       return -1;
+                       return 0;
                }
 
                req->cb (c, msg, c->server_name->str, ucl_parser_get_object (