From: Andrew Bartlett Date: Tue, 14 Aug 2012 05:58:59 +0000 (+1000) Subject: s4-dsdb: Improve memory handling in kccsrv_add_connection() X-Git-Tag: tevent-0.9.17~83 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1f7477349f1602b405df180d02f0bdef397ca589;p=thirdparty%2Fsamba.git s4-dsdb: Improve memory handling in kccsrv_add_connection() --- diff --git a/source4/dsdb/kcc/kcc_connection.c b/source4/dsdb/kcc/kcc_connection.c index a5894c1a888..266f753c37d 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"));