From f6652412f3afc2d85c7550979c0d909aade57738 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 25 May 2011 20:46:18 +0100 Subject: [PATCH] extensions ensure per conn allocation starts zeroed Signed-off-by: Andy Green --- lib/libwebsockets.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c index 7de11da..0a448d9 100644 --- a/lib/libwebsockets.c +++ b/lib/libwebsockets.c @@ -1248,6 +1248,9 @@ select_protocol: wsi->active_extensions_user[ wsi->count_active_extensions] = malloc(ext->per_session_data_size); + memset(wsi->active_extensions_user[ + wsi->count_active_extensions], 0, + ext->per_session_data_size); wsi->active_extensions[ wsi->count_active_extensions] = ext; -- 2.7.4