From cd0dc29ccbffae52f603ee3bc9f46968476683b3 Mon Sep 17 00:00:00 2001
From: Quanah Gibson-Mount <quanah@openldap.org>
Date: Mon, 3 Sep 2007 23:53:04 +0000
Subject: [PATCH] don't leak file descriptors (coverity)

---
 libraries/liblutil/ldif.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libraries/liblutil/ldif.c b/libraries/liblutil/ldif.c
index f3badef0b4..bb5ab7e1a1 100644
--- a/libraries/liblutil/ldif.c
+++ b/libraries/liblutil/ldif.c
@@ -866,6 +866,7 @@ ldif_read_record(
 						if ( fp2 ) {
 							LDIFFP *lnew = ber_memalloc( sizeof( LDIFFP ));
 							if ( lnew == NULL ) {
+								fclose( fp2 );
 								return 0;
 							}
 							lnew->prev = lfp->prev;
-- 
GitLab