]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/ldif.c
ITS#5129 fix alock_close with Quick mode
[openldap] / libraries / liblutil / ldif.c
index 482a604d62b13f7c3756ea8c5941572c6d6fabb3..bb5ab7e1a1da65cce3f9708ab4d44417f143571b 100644 (file)
@@ -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;
@@ -879,7 +880,9 @@ ldif_read_record(
                                                        /* We failed to open the file, this should
                                                         * be reported as an error somehow.
                                                         */
-                                                       break;
+                                                       ber_pvt_log_printf( LDAP_DEBUG_ANY, ldif_debug,
+                                                               _("ldif_read_record: include %s failed\n"), ptr );
+                                                       return 0;
                                                }
                                        }
                                }