From: Joseph Sutton Date: Fri, 6 Oct 2023 01:11:24 +0000 (+1300) Subject: s4:dsdb: Check return value of ldb_msg_add_empty() (CID 1449667) X-Git-Tag: talloc-2.4.2~1278 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7b4c7ca8c4309e9563ac90378b84e4b83bd1eab;p=thirdparty%2Fsamba.git s4:dsdb: Check return value of ldb_msg_add_empty() (CID 1449667) Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/dsdb/samdb/ldb_modules/samba_dsdb.c b/source4/dsdb/samdb/ldb_modules/samba_dsdb.c index d9de16e02c2..37213a5febc 100644 --- a/source4/dsdb/samdb/ldb_modules/samba_dsdb.c +++ b/source4/dsdb/samdb/ldb_modules/samba_dsdb.c @@ -333,8 +333,11 @@ static int samba_dsdb_init(struct ldb_module *module) } features_msg->dn = samba_dsdb_dn; - ldb_msg_add_empty(features_msg, SAMBA_COMPATIBLE_FEATURES_ATTR, - LDB_FLAG_MOD_DELETE, &features_el); + ret = ldb_msg_add_empty(features_msg, SAMBA_COMPATIBLE_FEATURES_ATTR, + LDB_FLAG_MOD_DELETE, &features_el); + if (ret != LDB_SUCCESS) { + return ret; + } if (samba_options_supported == 1) { for (i = 0;