[coverity] null checks

This commit is contained in:
akallabeth 2024-04-11 15:27:38 +02:00 committed by Martin Fleisz
parent 2477b37128
commit 1466d70dbc
2 changed files with 4 additions and 3 deletions

View File

@ -419,6 +419,9 @@ fail:
void freerdp_device_free(RDPDR_DEVICE* device)
{
if (!device)
return;
union
{
RDPDR_DEVICE* dev;
@ -430,8 +433,6 @@ void freerdp_device_free(RDPDR_DEVICE* device)
} cnv;
cnv.dev = device;
if (!cnv.dev)
return;
switch (device->Type)
{

View File

@ -261,7 +261,7 @@ BOOL rdp_read_share_control_header(rdpRdp* rdp, wStream* s, UINT16* tpktLength,
WLog_Print(rdp->log, WLOG_DEBUG,
"[Flow control PDU] type=%s, tpktLength=%" PRIuz ", remainingLength=%" PRIuz,
pdu_type_to_str(*type, buffer, sizeof(buffer)), tpktLength ? *tpktLength : 0,
*remainingLength);
remainingLength ? *remainingLength : 0);
return TRUE;
}