]> git.sur5r.net Git - openldap/commitdiff
don't leak file descriptors (coverity)
authorPierangelo Masarati <ando@openldap.org>
Mon, 3 Sep 2007 16:18:17 +0000 (16:18 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 3 Sep 2007 16:18:17 +0000 (16:18 +0000)
libraries/liblutil/ldif.c

index f3badef0b4721c8f06ecda1fe1994d487f6e13f8..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;