summaryrefslogtreecommitdiff
path: root/source4/libnet/libnet_samsync_ldb.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2016-06-28 14:38:57 +0200
committerRalph Boehme <slow@samba.org>2016-06-28 18:48:07 +0200
commit874a9d9c87c69b5dd62494c6372aa196daadc325 (patch)
treec08089f39eb9cb408a984ee8e2ff639ad0548ed4 /source4/libnet/libnet_samsync_ldb.c
parent6318615a63bc35c6d3ac555ea45f321d8988f0d6 (diff)
downloadsamba-874a9d9c87c69b5dd62494c6372aa196daadc325.tar.gz
libnet: Fix CID 1362934: CHECKED_RETURN
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source4/libnet/libnet_samsync_ldb.c')
-rw-r--r--source4/libnet/libnet_samsync_ldb.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/libnet/libnet_samsync_ldb.c b/source4/libnet/libnet_samsync_ldb.c
index f3a45b86257..5fdef7909f8 100644
--- a/source4/libnet/libnet_samsync_ldb.c
+++ b/source4/libnet/libnet_samsync_ldb.c
@@ -414,7 +414,12 @@ static NTSTATUS samsync_ldb_handle_user(TALLOC_CTX *mem_ctx,
samdb_msg_add_delete(state->sam_ldb, mem_ctx, msg,
remote_attrs[i]);
} else {
- ldb_msg_add(msg, el, LDB_FLAG_MOD_REPLACE);
+ ret = ldb_msg_add(msg, el, LDB_FLAG_MOD_REPLACE);
+ if (ret != LDB_SUCCESS) {
+ *error_string = talloc_strdup(
+ mem_ctx, "ldb_msg_add failed");
+ return NT_STATUS_NO_MEMORY;
+ }
}
}