coverity 156861 context destroy dereference context before NULL check
Context could be NULL only if context creation failed in the first place and user error path is bad... no network connectivity at that point... Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
2ec7c85e99
commit
2e3bf06139
1 changed files with 2 additions and 1 deletions
|
@ -326,13 +326,14 @@ lws_context_destroy(struct lws_context *context)
|
|||
{
|
||||
const struct lws_protocols *protocol = NULL;
|
||||
struct lws wsi;
|
||||
int n, m = context->count_threads;
|
||||
int n, m;
|
||||
|
||||
lwsl_notice("%s\n", __func__);
|
||||
|
||||
if (!context)
|
||||
return;
|
||||
|
||||
m = context->count_threads;
|
||||
context->being_destroyed = 1;
|
||||
|
||||
memset(&wsi, 0, sizeof(wsi));
|
||||
|
|
Loading…
Add table
Reference in a new issue