From: Pierangelo Masarati Date: Mon, 3 Sep 2007 16:18:17 +0000 (+0000) Subject: don't leak file descriptors (coverity) X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3f9df357e8bfe2c91873cf00241a6e20ccafff73;p=openldap don't leak file descriptors (coverity) --- 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;