From 5c5cd9f30b31f0255a484f7d2e3f9cfacc0ec3bf Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Wed, 15 Dec 2021 10:01:41 +0200
Subject: [PATCH] Fix a memleak in ndb from opened but not closed dbis.

Fixes: #1861
---
 lib/backend/ndb/glue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/backend/ndb/glue.c b/lib/backend/ndb/glue.c
index 7ba3056be..d528ebcea 100644
--- a/lib/backend/ndb/glue.c
+++ b/lib/backend/ndb/glue.c
@@ -77,7 +77,7 @@ static int ndb_Close(dbiIndex dbi, unsigned int flags)
     }
     if (rdb->db_dbenv)
 	closeEnv(rdb);
-    dbi->dbi_db = 0;
+    dbiFree(dbi);
     return 0;
 }
 
-- 
2.27.0

