From cabc6cee761a2a10236e9fe6bdbacb9de5415160 Mon Sep 17 00:00:00 2001
From: Alexey Tikhonov <atikhono@redhat.com>
Date: Fri, 22 Apr 2022 20:21:31 +0200
Subject: [PATCH] SDAP: sdap_get_generic_send(): fix mem leak
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Reviewed-by: Pavel Březina <pbrezina@redhat.com>
---
 src/providers/ldap/sdap_async.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c
index ebccd591e..1749c4f99 100644
--- a/src/providers/ldap/sdap_async.c
+++ b/src/providers/ldap/sdap_async.c
@@ -2124,6 +2124,7 @@ struct tevent_req *sdap_get_generic_send(TALLOC_CTX *memctx,
                                              false, NULL, NULL, 0, timeout,
                                              allow_paging);
     if (subreq == NULL) {
+        talloc_zfree(req);
         return NULL;
     }
     tevent_req_set_callback(subreq, sdap_get_generic_done, req);
-- 
2.32.0.windows.1

