summaryrefslogtreecommitdiff
path: root/src/pulsecore/core-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/core-util.c')
-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;