summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_eventlog_nt.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-11-20 16:31:44 +0100
committerGünther Deschner <gd@samba.org>2008-11-20 17:08:37 +0100
commit172628dca2b8553b8b7273a645393d5c96daa67e (patch)
treea42c31a3e09c384f29b2bb34ea24e956a0b6d1d9 /source3/rpc_server/srv_eventlog_nt.c
parentda683d6a73a37d18aa8fca52ef2b4837c7ff1345 (diff)
downloadsamba-172628dca2b8553b8b7273a645393d5c96daa67e.tar.gz
samba-172628dca2b8553b8b7273a645393d5c96daa67e.tar.bz2
samba-172628dca2b8553b8b7273a645393d5c96daa67e.zip
eventlog: don't crash in sync_eventlog_params().
When freeing the talloc ctx at the end of the routine, it must be a talloc ctx created inside. talloc_tos() needs to be valid after the function finishes, since callers (may) have data attached to it. Michael Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/rpc_server/srv_eventlog_nt.c')
-rw-r--r--source3/rpc_server/srv_eventlog_nt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c
index de2bafc969..71257dfdb5 100644
--- a/source3/rpc_server/srv_eventlog_nt.c
+++ b/source3/rpc_server/srv_eventlog_nt.c
@@ -426,7 +426,7 @@ static bool sync_eventlog_params( EVENTLOG_INFO *info )
struct registry_value *value;
WERROR wresult;
char *elogname = info->logname;
- TALLOC_CTX *ctx = talloc_tos();
+ TALLOC_CTX *ctx = talloc_stackframe();
bool ret = false;
DEBUG( 4, ( "sync_eventlog_params with %s\n", elogname ) );