1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s4-regsitry: Check return value of ldb_msg_add_empty().

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
This commit is contained in:
Andreas Schneider 2012-12-13 17:48:45 +01:00 committed by Günther Deschner
parent a3bbf1bf34
commit ae6947cc48

View File

@ -646,8 +646,14 @@ static WERROR ldb_del_value(TALLOC_CTX *mem_ctx, struct hive_key *key,
W_ERROR_HAVE_NO_MEMORY(msg);
msg->dn = ldb_dn_copy(msg, kd->dn);
W_ERROR_HAVE_NO_MEMORY(msg->dn);
ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL);
ret = ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL);
if (ret != LDB_SUCCESS) {
return WERR_FOOBAR;
}
ldb_msg_add_empty(msg, "type", LDB_FLAG_MOD_DELETE, NULL);
if (ret != LDB_SUCCESS) {
return WERR_FOOBAR;
}
ret = ldb_modify(kd->ldb, msg);