valgrind eliminate uninitialized warning on close
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
1ae1b1fae8
commit
fdd305a986
1 changed files with 3 additions and 1 deletions
|
@ -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) {
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue