From 3f6cec3b467c78104e915642b41f7625f35518d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= <ondra@mistotebe.net>
Date: Wed, 2 Oct 2024 13:23:44 +0100
Subject: [PATCH] ITS#10264 Free NoD data we stored locally

Reference:https://git.openldap.org/openldap/openldap/-/commit/3f6cec3b467c78104e915642b41f7625f35518d8
Conflict:no
---
 libraries/libldap/result.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c
index acbf51f55f..e9ac9f32b3 100644
--- a/libraries/libldap/result.c
+++ b/libraries/libldap/result.c
@@ -904,6 +904,13 @@ nextresp2:
 
 				if ( lr != &dummy_lr ) {
 					ldap_return_request( ld, lr, 1 );
+				} else {
+					if ( lr->lr_res_matched ) {
+						LDAP_FREE( lr->lr_res_matched );
+					}
+					if ( lr->lr_res_error ) {
+						LDAP_FREE( lr->lr_res_error );
+					}
 				}
 				lr = NULL;
 			}
-- 
GitLab

