pulsecore: don't leak d in case of error
authorMarc-André Lureau <marc-andre.lureau@nokia.com>
Wed, 18 Feb 2009 19:21:25 +0000 (21:21 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 19 Feb 2009 03:59:26 +0000 (04:59 +0100)
src/pulsecore/core-util.c

index 432ee3b76ad71b2cfdda14731757b45970bb2a6d..623a488855597f30d170fcbebf0390c8ae607b79 100644 (file)
@@ -1443,6 +1443,7 @@ char *pa_get_runtime_dir(void) {
 
     if (pa_make_secure_dir(d, m, (uid_t) -1, (gid_t) -1) < 0)  {
         pa_log_error("Failed to create secure directory: %s", pa_cstrerror(errno));
+        pa_xfree(d);
         goto fail;
     }