summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDeepak Srivastava <srivastava.d@samsung.com>2016-05-06 10:14:46 +0530
committerArun Raghavan <git@arunraghavan.net>2016-05-06 11:09:17 +0530
commitccc83b6cd7ab14e10f5fec72255a5a9786c277f9 (patch)
tree15aa573319f76613b0827f963c90d34c1997da0f /src
parent23c15c3b52a958887c1f8cad3c94879a8770ef0e (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/pulsecore/core-util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 19c89a9d0..b6eb85a30 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;