diff options
author | Lennart Poettering <lennart@poettering.net> | 2006-08-19 01:14:59 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2006-08-19 01:14:59 +0000 |
commit | c2db5f88646b2899400479b36ce7eeea44fa00f4 (patch) | |
tree | 18656a1301ecca51e6ee425b9830a908061afabe /src/pulsecore/log.c | |
parent | c979b87feab8fc444c2402fe6614a18f18c8b1b6 (diff) |
fix a memory leak
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1280 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/log.c')
-rw-r--r-- | src/pulsecore/log.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pulsecore/log.c b/src/pulsecore/log.c index 8bc673e59..ce0932211 100644 --- a/src/pulsecore/log.c +++ b/src/pulsecore/log.c @@ -91,7 +91,7 @@ void pa_log_levelv_meta( va_list ap) { const char *e; - char *text, *t, *n, *location = pa_xstrdup(""); + char *text, *t, *n, *location; assert(level < PA_LOG_LEVEL_MAX); assert(format); @@ -108,6 +108,8 @@ void pa_log_levelv_meta( location = pa_sprintf_malloc("[%s:%i %s()] ", file, line, func); else if (file) location = pa_sprintf_malloc("%s: ", pa_path_get_filename(file)); + else + location = pa_xstrdup(""); if (!pa_utf8_valid(text)) pa_log_level(level, __FILE__": invalid UTF-8 string following below:"); |