* Fix a couple potential frees of invalid pointers.

This commit is contained in:
Justin Maggard
2011-01-25 22:40:37 +00:00
parent 743a5ffdf9
commit 761f62ca26
2 changed files with 7 additions and 7 deletions

6
log.c
View File

@ -135,7 +135,11 @@ log_err(int level, enum _log_facility facility, char *fname, int lineno, char *f
// user log
va_start(ap, fmt);
//vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
vasprintf(&errbuf, fmt, ap);
if (vasprintf(&errbuf, fmt, ap) == -1)
{
va_end(ap);
return;
}
va_end(ap);
// timestamp