Fix potential memory leak
author=?UTF-8?q?Joakim=20S=C3=B6derberg?= <joakim.soderberg@gmail.com>
Thu, 25 Jun 2015 15:51:07 +0000 (17:51 +0200)
committerAndy Green <andy.green@linaro.org>
Mon, 12 Oct 2015 02:05:18 +0000 (10:05 +0800)
commitcaf7e3d63b8e60fa6c5ef242ac9651f79cc7fa2b
tree93bbc8bb1da1215a7a16d1d3dbd019633c36b2f5
parent8361d34ff983d1abbf296892dac0557d843feb4a
Fix potential memory leak

- Got rid of ifdef _WIN32 stuff adn moved to plat_ files instead.
- Also, check all calls to lws_zalloc, was potential failure on WIN32
- Made context destory enable to destroy a half inited context as well. This way I got get rid of some of the error handling complexity in libwebsocket_create_context
- Added TODOs for some potential problems I see where things might be leaking and such
lib/context.c
lib/libwebsockets.c
lib/lws-plat-unix.c
lib/lws-plat-win.c
lib/private-libwebsockets.h