pulsecore: Fixed possible memory leak

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=95291

Signed-off-by: Deepak Srivastava <srivastava.d@samsung.com>
Signed-off-by: Arun Raghavan <git@arunraghavan.net>
This commit is contained in:
Deepak Srivastava 2016-05-06 10:14:46 +05:30 committed by Arun Raghavan
parent 23c15c3b52
commit ccc83b6cd7

View file

@ -2535,8 +2535,10 @@ char *pa_getcwd(void) {
if (getcwd(p, l)) if (getcwd(p, l))
return p; return p;
if (errno != ERANGE) if (errno != ERANGE) {
pa_xfree(p);
return NULL; return NULL;
}
pa_xfree(p); pa_xfree(p);
l *= 2; l *= 2;