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 fd7c16ab9..599618164 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 0682eaeed..cc36615a2 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)