projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ae1b1f
)
valgrind eliminate uninitialized warning on close
author
Andy Green
<andy.green@linaro.org>
Mon, 11 Feb 2013 06:32:48 +0000
(14:32 +0800)
committer
Andy Green
<andy.green@linaro.org>
Mon, 11 Feb 2013 06:32:48 +0000
(14:32 +0800)
Signed-off-by: Andy Green <andy.green@linaro.org>
lib/libwebsockets.c
patch
|
blob
|
history
diff --git
a/lib/libwebsockets.c
b/lib/libwebsockets.c
index
3c76b75
..
b1b2917
100644
(file)
--- a/
lib/libwebsockets.c
+++ b/
lib/libwebsockets.c
@@
-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) {
/*