summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/events/tevent_s4.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/lib/events/tevent_s4.c b/source4/lib/events/tevent_s4.c
index 469ed72ee7..6770dd07af 100644
--- a/source4/lib/events/tevent_s4.c
+++ b/source4/lib/events/tevent_s4.c
@@ -46,10 +46,12 @@ static void ev_wrap_debug(void *context, enum tevent_debug_level level,
break;
};
- vasprintf(&s, fmt, ap);
- if (!s) return;
- DEBUG(samba_level, ("tevent: %s", s));
- free(s);
+ if (CHECK_DEBUGLVL(samba_level)) {
+ vasprintf(&s, fmt, ap);
+ if (!s) return;
+ DEBUG(samba_level, ("tevent: %s", s));
+ free(s);
+ }
}
/*