channels/disp/client/disp_main.c: fix possible null pointer dereference

found by cppcheck

channels/disp/client/disp_main.c:340:7: warning:
Either the condition 'if(disp&&disp->listener_callback)' is redundant or
there is possible null pointer dereference: disp. [nullPointerRedundantCheck]
This commit is contained in:
Ilya Shipitsin 2020-10-01 23:36:56 +05:00 committed by akallabeth
parent 1e0f41f3a3
commit b62da2cbcc

View File

@ -335,9 +335,9 @@ static UINT disp_plugin_terminated(IWTSPlugin* pPlugin)
IWTSVirtualChannelManager* mgr = disp->listener_callback->channel_mgr;
if (mgr)
IFCALL(mgr->DestroyListener, mgr, disp->listener);
free(disp->listener_callback);
}
free(disp->listener_callback);
free(disp->iface.pInterface);
free(pPlugin);
return CHANNEL_RC_OK;