[PATCH] core: fix potential memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2011-12-19 at 12:28 +0100, Peter Meerwald wrote:
> From: Peter Meerwald <p.meerwald at bct-electronic.com>
> 
> ---
>  src/pulsecore/core-util.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
> index 0173135..1aa5a9a 100644
> --- a/src/pulsecore/core-util.c
> +++ b/src/pulsecore/core-util.c
> @@ -1982,8 +1982,10 @@ static char *get_path(const char *fn, pa_bool_t prependmid, pa_bool_t rt) {
>      if (fn) {
>          char *r;
>  
> -        if (pa_is_path_absolute(fn))
> +        if (pa_is_path_absolute(fn)) {
> +            pa_xfree(rtp);
>              return pa_xstrdup(fn);
> +        }
>  
>          if (!rtp)
>              return NULL;

Pulled this series to my tree.

Cheers,
Arun



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux