diff options
author | Volker Lendecke <vl@samba.org> | 2020-12-26 09:27:10 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2021-01-08 20:31:33 +0000 |
commit | de9b7312f1d4ba610817ec5189ff48b63e93df95 (patch) | |
tree | 31f1fa300d329d4c7ed1783be971ede04ea01f7f /librpc | |
parent | d82acf7685fe0b02013794263df61c479162dd92 (diff) | |
download | samba-de9b7312f1d4ba610817ec5189ff48b63e93df95.tar.gz |
librpc: Fix an error path memleak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/rpc/dcesrv_core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/librpc/rpc/dcesrv_core.c b/librpc/rpc/dcesrv_core.c index 064ad38b8d6..9113bf89976 100644 --- a/librpc/rpc/dcesrv_core.c +++ b/librpc/rpc/dcesrv_core.c @@ -2341,7 +2341,10 @@ _PUBLIC_ NTSTATUS dcesrv_init_context(TALLOC_CTX *mem_ctx, dce_ctx->endpoint_list = NULL; dce_ctx->lp_ctx = lp_ctx; dce_ctx->assoc_groups_idr = idr_init(dce_ctx); - NT_STATUS_HAVE_NO_MEMORY(dce_ctx->assoc_groups_idr); + if (dce_ctx->assoc_groups_idr == NULL) { + TALLOC_FREE(dce_ctx); + return NT_STATUS_NO_MEMORY; + } dce_ctx->broken_connections = NULL; if (cb != NULL) { dce_ctx->callbacks = *cb; |