]> git.sur5r.net Git - openldap/commitdiff
don't leak file descriptors (coverity)
authorQuanah Gibson-Mount <quanah@openldap.org>
Mon, 3 Sep 2007 23:53:04 +0000 (23:53 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 3 Sep 2007 23:53:04 +0000 (23:53 +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;