extensions ensure per conn allocation starts zeroed
authorAndy Green <andy@warmcat.com>
Wed, 25 May 2011 19:46:18 +0000 (20:46 +0100)
committerAndy Green <andy@warmcat.com>
Wed, 25 May 2011 19:46:18 +0000 (20:46 +0100)
Signed-off-by: Andy Green <andy@warmcat.com>
lib/libwebsockets.c

index 7de11da..0a448d9 100644 (file)
@@ -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;