Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1758222619, "reponame":"libwebsockets", "desc":"libwebsockets lightweight C networking library", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets", "f":3, "items": [ {"schema":"libjg2-1", "cid":"72fcafefbb7d6852b251bff97c357efc", "commit": {"type":"commit", "time": 1461375378, "time_ofs": 480, "oid_tree": { "oid": "9bc4292fd3905fddcbd9727679b5e575b9c0f07e", "alias": []}, "oid":{ "oid": "8dd32ae7c1728796a60b2147c4b198ab09ae2676", "alias": []}, "msg": "http2 handle error path on ensure_user_space", "sig_commit": { "git_time": { "time": 1461375378, "offset": 480 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }, "sig_author": { "git_time": { "time": 1461375378, "offset": 480 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }}, "body": "http2 handle error path on ensure_user_space\n\nSigned-off-by: Andy Green \u003candy@warmcat.com\u003e\n" , "diff": "diff --git a/lib/http2.c b/lib/http2.c\nindex 317b8dd..2f3ea01 100644\n--- a/lib/http2.c\n+++ b/lib/http2.c\n@@ -64,8 +64,7 @@ lws_create_server_child_wsi(struct lws_vhost *vhost, struct lws *parent_wsi,\n \tif (parent_wsi-\u003eu.http2.child_count + 1 \u003d\u003d\n \t parent_wsi-\u003eu.http2.peer_settings.setting[\n \t\t\tLWS_HTTP2_SETTINGS__MAX_CONCURRENT_STREAMS])\n-\t\treturn NULL;\n-\n+\t\tgoto bail;\n \tlws_http2_init(\u0026wsi-\u003eu.http2.peer_settings);\n \tlws_http2_init(\u0026wsi-\u003eu.http2.my_settings);\n \twsi-\u003eu.http2.stream_id \u003d sid;\n@@ -83,12 +82,20 @@ lws_create_server_child_wsi(struct lws_vhost *vhost, struct lws *parent_wsi,\n \twsi-\u003emode \u003d parent_wsi-\u003emode;\n \n \twsi-\u003eprotocol \u003d \u0026vhost-\u003eprotocols[0];\n-\tlws_ensure_user_space(wsi);\n+\tif (lws_ensure_user_space(wsi))\n+\t\tgoto bail;\n \n \tlwsl_info(\u0022%s: %p new child %p, sid %d, user_space\u003d%p\u005cn\u0022, __func__,\n \t\t parent_wsi, wsi, sid, wsi-\u003euser_space);\n \n \treturn wsi;\n+\n+bail:\n+\tvhost-\u003eprotocols[0].callback(wsi, LWS_CALLBACK_WSI_DESTROY,\n+\t\t\t NULL, NULL, 0);\n+\tlws_free(wsi);\n+\n+\treturn NULL;\n }\n \n int lws_remove_server_child_wsi(struct lws_context *context, struct lws *wsi)\n","s":{"c":1758222619,"u": 1574}} ],"g": 2971,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}