summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_cm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 7da7a82343..b64937da23 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -208,10 +208,12 @@ static bool fork_child_dc_connect(struct winbindd_domain *domain)
close_conns_after_fork();
if (!override_logfile) {
- pstring logfile;
- pstr_sprintf(logfile, "%s/log.winbindd-dc-connect", dyn_LOGFILEBASE);
- lp_set_logfile(logfile);
- reopen_logs();
+ char *logfile;
+ if (asprintf(&logfile, "%s/log.winbindd-dc-connect", dyn_LOGFILEBASE) > 0) {
+ lp_set_logfile(logfile);
+ SAFE_FREE(logfile);
+ reopen_logs();
+ }
}
mem_ctx = talloc_init("fork_child_dc_connect");