[pulseaudio-commits] r1290 - /trunk/src/modules/module-volume-restore.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Aug 18 19:23:12 PDT 2006


Author: lennart
Date: Sat Aug 19 04:23:11 2006
New Revision: 1290

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

Modified:
    trunk/src/modules/module-volume-restore.c

Modified: trunk/src/modules/module-volume-restore.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-volume-restore.c?rev=1290&root=pulseaudio&r1=1289&r2=1290&view=diff
==============================================================================
--- trunk/src/modules/module-volume-restore.c (original)
+++ trunk/src/modules/module-volume-restore.c Sat Aug 19 04:23:11 2006
@@ -237,8 +237,10 @@
     t = pa_sprintf_malloc("%s$%s", c->driver, c->name);
     t[strcspn(t, "\n\r#")] = 0;
 
-    if (!*t)
-        return NULL;
+    if (!*t) {
+        pa_xfree(t);
+        return NULL;
+    }
 
     if ((e = strrchr(t, '('))) {
         char *k = e + 1 + strspn(e + 1, "0123456789-");




More information about the pulseaudio-commits mailing list