]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix memory leak in HTTP request code
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 14 Mar 2016 23:58:28 +0000 (23:58 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 14 Mar 2016 23:58:28 +0000 (23:58 +0000)
src/libutil/http.c

index 0fe8588e77edc42a10bc0b488ffa2d1104829e45..5e8484e249d70b2277b7e2cce30dcf49e1a1f02c 100644 (file)
@@ -1810,7 +1810,7 @@ rspamd_http_message_from_url (const gchar *url)
        }
 
        msg->host = rspamd_fstring_new_init (host, pu.field_data[UF_HOST].len);
-       msg->url = rspamd_fstring_new_init (path, pathlen);
+       msg->url = rspamd_fstring_append (msg->url, path, pathlen);
 
        return msg;
 }