[pulseaudio-commits] r1280 - /trunk/src/pulsecore/log.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Aug 18 18:15:01 PDT 2006


Author: lennart
Date: Sat Aug 19 03:14:59 2006
New Revision: 1280

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1280&root=pulseaudio&view=rev
Log:
fix a memory leak

Modified:
    trunk/src/pulsecore/log.c

Modified: trunk/src/pulsecore/log.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/log.c?rev=1280&root=pulseaudio&r1=1279&r2=1280&view=diff
==============================================================================
--- trunk/src/pulsecore/log.c (original)
+++ trunk/src/pulsecore/log.c Sat Aug 19 03:14:59 2006
@@ -91,7 +91,7 @@
         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 @@
         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:");




More information about the pulseaudio-commits mailing list