In src/pulsecore/core-util.c, below function char *pa_getcwd(void) { size_t l = 128; for (;;) { char *p = pa_xmalloc(l); if (getcwd(p, l)) return p; if (errno != ERANGE) { return NULL; } pa_xfree(p); l *= 2; } } If (errno != ERANGE) condition occur, then memory allocated for p will leak.
Hey Deepak, that looks legit. Want to send in a patch?
Dear Arun, Patch has been sent to pulseaudio-discuss@lists.freedesktop.org. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=95291 Signed-off-by: Deepak Srivastava <srivastava.d@samsung.com> --- 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
Sounds good. In general, it's enough to either file a bug or post to the ML. The list is preferred since patches there get collected on Patchwork and we have a single way to look at the review queue -- http://patchwork.freedesktop.org/project/pulseaudio/patches/ Also, you might want to subscribe to the mailing list, since posting to it is filtered (I'll let your mail through manually now).
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.