Memory leak fix.

This commit is contained in:
Nick Peng
2018-06-26 22:55:40 +08:00
parent 06bc0b1642
commit 359cef4e8c
9 changed files with 89 additions and 46 deletions

View File

@@ -287,16 +287,16 @@ int tlog_vext(tlog_level level, const char *file, int line, const char *func, vo
int len;
int maxlen = 0;
if (level < tlog_set_level) {
return 0;
}
if (tlog.buff == NULL) {
vprintf(format, ap);
printf("\n");
return -1;
}
if (level < tlog_set_level) {
return 0;
}
pthread_mutex_lock(&tlog.lock);
do {
if (tlog.end == tlog.start) {