Blob Blame History Raw
From 02a9cb46ece79d6205a847e6941a772febe47cff Mon Sep 17 00:00:00 2001
From: Viktor Ashirov <vashirov@redhat.com>
Date: Thu, 5 Aug 2021 16:04:49 +0200
Subject: [PATCH] back-sch: fix memory leak in backend_search_cb()

Resolves: rhbz#1967906

Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
---
 src/back-sch.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/back-sch.c b/src/back-sch.c
index 0ed06fb..172d619 100644
--- a/src/back-sch.c
+++ b/src/back-sch.c
@@ -1793,6 +1793,7 @@ backend_search_cb(Slapi_PBlock *pb)
 		slapi_ch_free_string(&target);
 		if (cbdata.answer == FALSE) {
 			/* None of the configured trees in the sets matched the target at all, ignore search */
+			slapi_sdn_free(&cbdata.target_dn);
 			return 0;
 		}
 	}
-- 
2.31.1