1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s4-events: Do not vasprintf() the tevent debug messages that will not be shown

This malloc() and free() actually shows up quite high on a call profile of
provision of the AD DC.

Andrew Bartlett
This commit is contained in:
Andrew Bartlett 2012-08-09 18:34:48 +10:00
parent 434bed75c4
commit 7e562cf3eb

View File

@ -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);
}
}
/*