1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

valgrind eliminate uninitialized warning on close

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2013-02-11 14:32:48 +08:00
parent 1ae1b1fae8
commit fdd305a986

View file

@ -272,7 +272,9 @@ libwebsocket_close_and_free_session(struct libwebsocket_context *context,
lwsl_debug("sending close indication...\n");
n = libwebsocket_write(wsi, &buf[LWS_SEND_BUFFER_PRE_PADDING],
/* make valgrind happy */
memset(buf, 0, sizeof buf);
n = libwebsocket_write(wsi, &buf[LWS_SEND_BUFFER_PRE_PADDING + 2],
0, LWS_WRITE_CLOSE);
if (!n) {
/*