commit | 7fdc97c3e519ef7921a4654084ea0c63f738a75c | [log] [tgz] |
---|---|---|
author | Borawski.Lukasz <lukasz.borawski@intel.com> | Wed Feb 21 13:08:48 2018 +0100 |
committer | Ed Tanous <ed.tanous@intel.com> | Tue Mar 06 22:35:00 2018 +0000 |
tree | e7ef2819389295dcd38ff1f3b648270dc96acae2 | |
parent | 5b6a1f9b6c1477f7d745c6f0f5d5487dc42affcc [diff] |
Fix unbounded memory consumption in crow Connection objects wheren't deleted in case the async_accept() function returned an error. Fix found in the upstream crow repo: https://github.com/ipkn/crow/pull/205 Change-Id: I7d230c96a64cebf2b702ee58eac271bd0b989d3e Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com> Signed-off-by: Ed Tanous <ed.tanous@intel.com>
diff --git a/crow/include/crow/http_server.h b/crow/include/crow/http_server.h index 54dd8a8..387d4a4 100644 --- a/crow/include/crow/http_server.h +++ b/crow/include/crow/http_server.h
@@ -210,6 +210,8 @@ [this, p, &is](boost::system::error_code ec) { if (!ec) { is.post([p] { p->start(); }); + } else { + delete p; } do_accept(); });