]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/ldif.c
Fix typo in dec to bin conversion
[openldap] / libraries / liblutil / ldif.c
index 361a5a37b261c9c795e2e8c7b9c9cd53456910ca..bb5ab7e1a1da65cce3f9708ab4d44417f143571b 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -865,6 +865,10 @@ ldif_read_record(
                                                fp2 = ldif_open_url( ptr );
                                                if ( fp2 ) {
                                                        LDIFFP *lnew = ber_memalloc( sizeof( LDIFFP ));
+                                                       if ( lnew == NULL ) {
+                                                               fclose( fp2 );
+                                                               return 0;
+                                                       }
                                                        lnew->prev = lfp->prev;
                                                        lnew->fp = lfp->fp;
                                                        lfp->prev = lnew;
@@ -876,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;
                                                }
                                        }
                                }