summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-08-14 15:58:59 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-08-14 08:27:19 +0200
commit1f7477349f1602b405df180d02f0bdef397ca589 (patch)
tree2e41d581b3cae50c57f788065188cd07a6da6302
parent77990c183155d3bacbb5dae7f276ed7c2081553a (diff)
downloadsamba-1f7477349f1602b405df180d02f0bdef397ca589.tar.gz
samba-1f7477349f1602b405df180d02f0bdef397ca589.tar.bz2
samba-1f7477349f1602b405df180d02f0bdef397ca589.zip
s4-dsdb: Improve memory handling in kccsrv_add_connection()
-rw-r--r--source4/dsdb/kcc/kcc_connection.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/dsdb/kcc/kcc_connection.c b/source4/dsdb/kcc/kcc_connection.c
index a5894c1a88..266f753c37 100644
--- a/source4/dsdb/kcc/kcc_connection.c
+++ b/source4/dsdb/kcc/kcc_connection.c
@@ -46,6 +46,11 @@ static int kccsrv_add_connection(struct kccsrv_service *s,
bool ok;
tmp_ctx = talloc_new(s);
+ if (!tmp_ctx) {
+ DEBUG(0, ("failed to talloc\n"));
+ ret = LDB_ERR_OPERATIONS_ERROR;
+ goto done;
+ }
new_dn = samdb_ntds_settings_dn(s->samdb);
if (!new_dn) {
DEBUG(0, ("failed to find NTDS settings\n"));