<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Possible memory leak in pulsecore/core-util.c"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=95291#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Possible memory leak in pulsecore/core-util.c"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=95291">bug 95291</a>
              from <span class="vcard"><a class="email" href="mailto:srivastava.d@samsung.com" title="DEEPAK SRIVASTAVA <srivastava.d@samsung.com>"> <span class="fn">DEEPAK SRIVASTAVA</span></a>
</span></b>
        <pre>Dear Arun, 
Patch has been sent to <a href="mailto:pulseaudio-discuss@lists.freedesktop.org">pulseaudio-discuss@lists.freedesktop.org</a>.


BugLink: <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Possible memory leak in pulsecore/core-util.c"
   href="show_bug.cgi?id=95291">https://bugs.freedesktop.org/show_bug.cgi?id=95291</a>

Signed-off-by: Deepak Srivastava <<a href="mailto:srivastava.d@samsung.com">srivastava.d@samsung.com</a>>
---
 src/pulsecore/core-util.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 19c89a9..b6eb85a 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -2535,8 +2535,10 @@ char *pa_getcwd(void) {
         if (getcwd(p, l))
             return p;

-        if (errno != ERANGE)
+        if (errno != ERANGE) {
+            pa_xfree(p);
             return NULL;
+        }

         pa_xfree(p);
         l *= 2;
-- 
1.9.1</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>