Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dcommander committed Aug 3, 2024
2 parents b5b7122 + 801918e commit 925d780
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ used to specify the external SSH client command. In `Via`/`Tunnel` SSH
command-line templates, including the default ones, `%S` is now replaced with
the value of this new parameter.

7. Fixed a regression introduced by 3.0 beta1[24] that caused the TurboVNC
Server to leak memory when the RFB flow control extensions were used.


3.1.1
=====
Expand Down
5 changes: 3 additions & 2 deletions unix/Xvnc/programs/Xserver/hw/vnc/flowcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Bool rfbSendRTTPing(rfbClientPtr cl)
static void HandleRTTPong(rfbClientPtr cl)
{
struct timeval now;
rfbRTTInfo *rttInfo;
rfbRTTInfo *rttInfo = NULL;
unsigned rtt, delay;

if (xorg_list_is_empty(&cl->pings))
Expand All @@ -233,7 +233,7 @@ static void HandleRTTPong(rfbClientPtr cl)
/* Pings sent before the last adjustment aren't interesting, as they aren't a
measure of the current congestion window. */
if (isBefore(&rttInfo->tv, &cl->lastAdjustment))
return;
goto bailout;

/* Estimate added delay because of overtaxed buffers (see above.) */
delay = rttInfo->extra * cl->baseRTT / cl->congWindow;
Expand Down Expand Up @@ -265,6 +265,7 @@ static void HandleRTTPong(rfbClientPtr cl)
cl->measurements++;
UpdateCongestion(cl);

bailout:
free(rttInfo);
}

Expand Down
1 change: 1 addition & 0 deletions unix/Xvnc/programs/Xserver/hw/vnc/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1672,6 +1672,7 @@ void ddxGiveUp(enum ExitCode error)
#endif
ShutdownTightThreads();
TimerFree(pointerLockTimer);
rfbRemoveScreens(&rfbScreens);
free(rfbFB.pfbMemory);
if (initOutputCalled) {
char unixSocketName[32];
Expand Down
2 changes: 2 additions & 0 deletions unix/Xvnc/programs/Xserver/hw/vnc/rfbssl_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ rfbSslCtx *rfbssl_init(rfbClientPtr cl, Bool anon)
rfbssl_error("SSL_CTX_set_tmp_dh()");
goto bailout;
}
crypto.DH_free(dh);
dh = NULL;
if (!ssl.SSL_CTX_set_cipher_list(ctx->ssl_ctx, rfbAuthCipherSuites ?
rfbAuthCipherSuites :
"aNULL")) {
Expand Down

0 comments on commit 925d780

Please sign in to comment.