Coverity - check for malloc failure (however unlikely...)

This commit is contained in:
Howard Chu 2007-02-13 11:27:06 +00:00
parent a256afcdc3
commit d38f2d8096

View file

@ -434,6 +434,9 @@ process_ldif_rec( char *rbuf, int linenum )
lines = ldif_countlines( rbuf );
btype = ber_memcalloc( 1, (lines+1)*2*sizeof(struct berval)+lines );
if ( !btype )
return LDAP_NO_MEMORY;
vals = btype+lines+1;
freeval = (char *)(vals+lines+1);
i = -1;