valgrind free rx_user_buffer if entered CONNMODE_WS_SERVING
authorAndy Green <andy.green@linaro.org>
Mon, 11 Feb 2013 04:37:13 +0000 (12:37 +0800)
committerAndy Green <andy.green@linaro.org>
Mon, 11 Feb 2013 04:37:13 +0000 (12:37 +0800)
commitbebc1bb85295c27477c984c32b14bebbea572ada
treef0d081864d439474a8fb011412df732bbcbb066d
parenta7109e6ebf5dbe4fc6c33df5b182c3dbe4ce32d0
valgrind free rx_user_buffer if entered CONNMODE_WS_SERVING

This seems to be enough to get a clean valgrind run for the
test server with 1 x chrome and 1 x libwebsockets-test-client
session being run for 10s

lwsts[19767]: libwebsockets-test-server exited cleanly
==19767==
==19767== HEAP SUMMARY:
==19767==     in use at exit: 0 bytes in 0 blocks
==19767==   total heap usage: 41,071 allocs, 41,071 frees, 27,464,834 bytes allocated
==19767==
==19767== All heap blocks were freed -- no leaks are possible
==19767==
==19767== For counts of detected and suppressed errors, rerun with: -v
==19767== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)

test client is another story...

Signed-off-by: Andy Green <andy.green@linaro.org>
lib/libwebsockets.c