diff --git a/libfreerdp/common/settings.c b/libfreerdp/common/settings.c index a58398e6a..3beba43d9 100644 --- a/libfreerdp/common/settings.c +++ b/libfreerdp/common/settings.c @@ -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) { diff --git a/libfreerdp/core/rdp.c b/libfreerdp/core/rdp.c index 29a377d85..466a9a79d 100644 --- a/libfreerdp/core/rdp.c +++ b/libfreerdp/core/rdp.c @@ -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; }