[pulseaudio-discuss] [PATCH] pulsecore: Fixed possible memory leak

Arun Raghavan arun at accosted.net
Fri May 6 05:41:36 UTC 2016


On 6 May 2016 at 10:14, Deepak Srivastava <srivastava.d at samsung.com> wrote:
> BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=95291
>
> Signed-off-by: Deepak Srivastava <srivastava.d at 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;
> --


Thanks, picked this up for master instead of next since it's a leak
fix and fairly straightforward.

-- Arun


More information about the pulseaudio-discuss mailing list