]> git.sur5r.net Git - openldap/commitdiff
Coverity - check for malloc failure (however unlikely...)
authorHoward Chu <hyc@openldap.org>
Tue, 13 Feb 2007 11:27:06 +0000 (11:27 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 13 Feb 2007 11:27:06 +0000 (11:27 +0000)
clients/tools/ldapmodify.c

index 06a636f812b8bb6fe19d31da4d5da91041fe6bd4..ee59c0f7dc8f83d0a203245f952f024cb591ff00 100644 (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;