[pulseaudio-commits] r2486 - /trunk/src/pulse/context.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue May 27 15:04:10 PDT 2008


Author: lennart
Date: Wed May 28 00:04:09 2008
New Revision: 2486

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

Modified:
    trunk/src/pulse/context.c

Modified: trunk/src/pulse/context.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulse/context.c?rev=2486&root=pulseaudio&r1=2485&r2=2486&view=diff
==============================================================================
--- trunk/src/pulse/context.c (original)
+++ trunk/src/pulse/context.c Wed May 28 00:04:09 2008
@@ -752,11 +752,15 @@
 
     p = pa_sprintf_malloc("/tmp/pulse-%s", u);
 
-    if (stat(p, &st) < 0)
+    if (stat(p, &st) < 0) {
+        pa_xfree(p);
         return NULL;
-
-    if (st.st_uid != getuid())
+    }
+
+    if (st.st_uid != getuid()) {
+        pa_xfree(p);
         return NULL;
+    }
 
     return p;
 }




More information about the pulseaudio-commits mailing list