summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/events.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/lib/events.c b/source3/lib/events.c
index 72fd40ef59..cafe598ca0 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -434,11 +434,13 @@ static void s3_event_debug(void *context, enum tevent_debug_level level,
break;
};
- if (vasprintf(&s, fmt, ap) == -1) {
- return;
+ if (CHECK_DEBUGLVL(samba_level)) {
+ if (vasprintf(&s, fmt, ap) == -1) {
+ return;
+ }
+ DEBUG(samba_level, ("s3_event: %s", s));
+ free(s);
}
- DEBUG(samba_level, ("s3_event: %s", s));
- free(s);
}
struct tevent_context *s3_tevent_context_init(TALLOC_CTX *mem_ctx)