diff options
author | Philipp Gesang <philipp.gesang@intra2net.com> | 2018-12-18 16:09:19 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2018-12-20 03:19:28 +0100 |
commit | 5c928d7cd1d0ac994fe95892eec235b939ad2ec9 (patch) | |
tree | ed652f4ea69e61e07af61f1c7f7666b5c81263eb /lib/audit_logging | |
parent | 35349fecbd075a5e5dd4c87be465d61c5104fb21 (diff) | |
download | samba-5c928d7cd1d0ac994fe95892eec235b939ad2ec9.tar.gz |
lib/audit_logging: actually create talloc
Heal damage of 79f494e51e..
That context is being passed around and freed but is never
actually allocated on that stack.
Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/audit_logging')
-rw-r--r-- | lib/audit_logging/audit_logging.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/audit_logging/audit_logging.c b/lib/audit_logging/audit_logging.c index 42b93137c07..6944da7f872 100644 --- a/lib/audit_logging/audit_logging.c +++ b/lib/audit_logging/audit_logging.c @@ -245,6 +245,12 @@ void audit_message_send( return; } + ctx = talloc_new(NULL); + if (ctx == NULL) { + DBG_ERR("Out of memory creating temporary context\n"); + return; + } + /* Need to refetch the address each time as the destination server may * have disconnected and reconnected in the interim, in which case * messages may get lost |