From 168c2a4c90978457733b6c09321488c9306c9788 Mon Sep 17 00:00:00 2001 From: rfm Date: Sun, 24 Nov 2024 16:38:23 +0000 Subject: [PATCH] fix a leak establishign a connection --- ChangeLog | 5 +++++ Source/NSSocketPort.m | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fd7c16ab99..5996181645 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-11-24 Richard Frith-Macdonald + + * Source/NSSocketPort.m: fix leak of data object when establishing a + new connection. + 2024-11-22 Richard Frith-Macdonald * Tools/AGSIndex: (-makeRefs:) process child nodes in loop rather diff --git a/Source/NSSocketPort.m b/Source/NSSocketPort.m index 0682eaeed4..cc36615a2a 100644 --- a/Source/NSSocketPort.m +++ b/Source/NSSocketPort.m @@ -1247,7 +1247,8 @@ - (void) receivedEventWrite * first thing to do is send out port information (after setting * up a TLS session if necessary). */ - ASSIGN(cData, newDataWithEncodedPort(p)); + RELEASE(cData); + cData = newDataWithEncodedPort(p); cLength = 0; #if defined(HAVE_GNUTLS)