5e0101
From 02a9cb46ece79d6205a847e6941a772febe47cff Mon Sep 17 00:00:00 2001
5e0101
From: Viktor Ashirov <vashirov@redhat.com>
5e0101
Date: Thu, 5 Aug 2021 16:04:49 +0200
5e0101
Subject: [PATCH] back-sch: fix memory leak in backend_search_cb()
5e0101
5e0101
Resolves: rhbz#1967906
5e0101
5e0101
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
5e0101
---
5e0101
 src/back-sch.c | 1 +
5e0101
 1 file changed, 1 insertion(+)
5e0101
5e0101
diff --git a/src/back-sch.c b/src/back-sch.c
5e0101
index 0ed06fb..172d619 100644
5e0101
--- a/src/back-sch.c
5e0101
+++ b/src/back-sch.c
5e0101
@@ -1793,6 +1793,7 @@ backend_search_cb(Slapi_PBlock *pb)
5e0101
 		slapi_ch_free_string(&target);
5e0101
 		if (cbdata.answer == FALSE) {
5e0101
 			/* None of the configured trees in the sets matched the target at all, ignore search */
5e0101
+			slapi_sdn_free(&cbdata.target_dn);
5e0101
 			return 0;
5e0101
 		}
5e0101
 	}
5e0101
-- 
5e0101
2.31.1
5e0101