fix a memory leak

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1280 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2006-08-19 01:14:59 +00:00
parent c979b87fea
commit c2db5f8864

View file

@ -91,7 +91,7 @@ void pa_log_levelv_meta(
va_list ap) { va_list ap) {
const char *e; const char *e;
char *text, *t, *n, *location = pa_xstrdup(""); char *text, *t, *n, *location;
assert(level < PA_LOG_LEVEL_MAX); assert(level < PA_LOG_LEVEL_MAX);
assert(format); assert(format);
@ -108,6 +108,8 @@ void pa_log_levelv_meta(
location = pa_sprintf_malloc("[%s:%i %s()] ", file, line, func); location = pa_sprintf_malloc("[%s:%i %s()] ", file, line, func);
else if (file) else if (file)
location = pa_sprintf_malloc("%s: ", pa_path_get_filename(file)); location = pa_sprintf_malloc("%s: ", pa_path_get_filename(file));
else
location = pa_xstrdup("");
if (!pa_utf8_valid(text)) if (!pa_utf8_valid(text))
pa_log_level(level, __FILE__": invalid UTF-8 string following below:"); pa_log_level(level, __FILE__": invalid UTF-8 string following below:");