Fixed undefined behavior in wf_peer_main_loop function

Undefined behavior on "wfPeerContext *context", as it is accessed before being initialized or assigned. Fixed.
This commit is contained in:
Abhineet-Ayan-Verma 2017-02-15 15:56:44 +05:30 committed by GitHub
parent 0540e189b1
commit 999cc22cdd
1 changed files with 2 additions and 2 deletions

View File

@ -279,11 +279,11 @@ DWORD WINAPI wf_peer_main_loop(LPVOID lpParam)
if (!client->Initialize(client))
goto fail_client_initialize;
context = (wfPeerContext*) client->context;
if (context->socketClose)
goto fail_socked_closed;
context = (wfPeerContext*) client->context;
wfi = context->info;
if (wfi->input_disabled)