- global_lastmod == ON)) && be->be_update_ndn == NULL ) {
-
- add_created_attrs( op, e );
+ global_lastmod == ON)) && be->be_update_ndn == NULL )
+ {
+ rc = add_created_attrs( op, e );
+
+ if( rc != LDAP_SUCCESS ) {
+ entry_free( e );
+ send_ldap_result( conn, op, rc,
+ NULL, "no-user-modification attribute type",
+ NULL, NULL );
+ return rc;
+ }