if ( op ) {
*cid = op->o_tmpalloc( sizeof( ComponentId ), op->o_tmpmemctx );
} else {
- *cid = malloc( sizeof( ComponentId ) );
+ *cid = SLAP_MALLOC( sizeof( ComponentId ) );
+ }
+ if (*cid == NULL) {
+ return LDAP_NO_MEMORY;
}
**cid = _cid;
return LDAP_SUCCESS;
ca_comp_ref = op->o_tmpalloc( sizeof( ComponentReference ),
op->o_tmpmemctx );
} else {
- ca_comp_ref = malloc( sizeof( ComponentReference ) );
+ ca_comp_ref = SLAP_MALLOC( sizeof( ComponentReference ) );
}
if ( !ca_comp_ref ) return LDAP_NO_MEMORY;
if ( op )
_ca = op->o_tmpalloc( sizeof( ComponentAssertion ), op->o_tmpmemctx );
else
- _ca = malloc( sizeof( ComponentAssertion ) );
+ _ca = SLAP_MALLOC( sizeof( ComponentAssertion ) );
if ( !_ca ) return LDAP_NO_MEMORY;
if ( op ) {
*filt = op->o_tmpalloc( sizeof(f), op->o_tmpmemctx );
} else {
- *filt = malloc( sizeof(f) );
+ *filt = SLAP_MALLOC( sizeof(f) );
+ }
+ if ( *filt == NULL ) {
+ return LDAP_NO_MEMORY;
}
**filt = f;
}