Fix monitorlayout PDU

commit ec699f6c75 moved the array
allocation into display_convert_rdp_monitor_to_monitor_def without
updating its only call site.

This leads to display_convert_rdp_monitor_to_monitor_def failing
because the array already exists.
This commit is contained in:
Derek Foreman 2022-06-07 15:59:12 -05:00 committed by akallabeth
parent dacc1e1c0f
commit a547f8c4b0

View File

@ -572,17 +572,11 @@ BOOL rdp_server_accept_client_font_list_pdu(rdpRdp* rdp, wStream* s)
peer->AdjustMonitorsLayout(peer)) peer->AdjustMonitorsLayout(peer))
{ {
/* client supports the monitorLayout PDU, let's send him the monitors if any */ /* client supports the monitorLayout PDU, let's send him the monitors if any */
MONITOR_DEF* monitors = (MONITOR_DEF*)calloc(settings->MonitorCount, sizeof(MONITOR_DEF)); MONITOR_DEF* monitors = NULL;
if (!monitors)
return FALSE;
if (!display_convert_rdp_monitor_to_monitor_def(settings->MonitorCount, if (!display_convert_rdp_monitor_to_monitor_def(settings->MonitorCount,
settings->MonitorDefArray, &monitors)) settings->MonitorDefArray, &monitors))
{
free(monitors);
return FALSE; return FALSE;
}
if (!freerdp_display_send_monitor_layout(rdp->context, settings->MonitorCount, monitors)) if (!freerdp_display_send_monitor_layout(rdp->context, settings->MonitorCount, monitors))
{ {